You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* allow caching of other HTTP methods like POST
* add contentlength and bodyhash key template vars
For caching POST requests it's important to distinguish requests between different body contents. This commit adds `http.request.contentlength` and `http.request.bodyhash`. For the body hash it's important that the cache key is calculated before the body has been read (before it's empty). Therefore the key is passed to `fetchUpstream`.
Copy file name to clipboardExpand all lines: readme.org
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,6 +119,11 @@
119
119
*** match_path
120
120
Only the request's path match the condition will be cached. Ex. =/= means all request need to be cached because all request's path must start with =/=
121
121
122
+
*** match_methods
123
+
By default, only =GET= and =POST= methods are cached. If you would like to cache other methods as well you can configure here which methods should be cached, e.g.: =GET HEAD POST=.
124
+
125
+
To be able to distinguish different POST requests, it is advisable to include the body hash in the cache key, e.g.: ={http.request.method} {http.request.host}{http.request.uri.path}?{http.request.uri.query} {http.request.contentlength} {http.request.bodyhash}=
0 commit comments