Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* Fixed POST detection for Boost.

  • Loading branch information...
commit 79d399040e2f9eee260ce36550c9243da4629ae7 1 parent c86ab8d
@perusio authored
View
8 map_cache.conf
@@ -3,14 +3,6 @@
### Testing if we should be serving content from cache or not. This is
### needed for any Drupal setup that uses and external cache.
-## Testing the request method. Only GET and HEAD are caching
-## safe. This is only needed for Boost. If using microcaching you
-## comment out the map directive below.
-map $request_method $no_cache {
- default 0;
- POST 1; # POST requests aren't cached usually
-}
-
## Testing for the session cookie being present. If there is then no
## caching is to be done. Note that this is for someone using either
## Drupal 7 pressflow or stock Drupal 6 core with no_anon
View
5 sites-available/drupal_boost.conf
@@ -192,6 +192,11 @@ location @cache {
return 418; # I'm a teapot/I can't get no cachifaction
}
+ ## No caching for POST requests.
+ if ($request_method = POST) {
+ return 418;
+ }
+
# Now for some header tweaking. We use a date that differs
# from stock Drupal. Everyone seems to be using their
# birthdate. Why go against the grain?
View
10 sites-available/drupal_boost6.conf
@@ -34,6 +34,11 @@ location / {
return 418; # I'm a teapot/I can't get no cachifaction
}
+ ## No caching for POST requests.
+ if ($request_method = POST) {
+ return 418;
+ }
+
try_files /cache/normal/$host/_${args}.html /cache/perm/$host/_.css /cache/perm/$host/_.js /cache/$host/0/.html /cache/$host/0/index.html /index.php;
}
@@ -214,6 +219,11 @@ location @cache {
return 418; # I'm a teapot/I can't get no cachifaction
}
+ ## No caching for POST requests.
+ if ($request_method = POST) {
+ return 418;
+ }
+
# Now for some header tweaking. We use a date that differs
# from stock Drupal. Everyone seems to be using their
# birthdate. Why go against the grain?
Please sign in to comment.
Something went wrong with that request. Please try again.