Forbid method switching

This averts the following scenario:

1. Client POSTs
2. server does not support mod rewrite and 302 redirects to /index.php/theaction
3. client follows, but with a GET
4. 405
This commit is contained in:
Grégoire Paris
2017-11-30 16:41:50 +01:00
committed by GitHub
parent dc56354838
commit 893d8c7da0
+1 -1
View File
@@ -62,7 +62,7 @@ DirectoryIndex index.php
# When mod_rewrite is not available, we instruct a temporary redirect of
# the start page to the front controller explicitly so that the website
# and the generated links can still be used.
RedirectMatch 302 ^/$ /index.php/
RedirectMatch 307 ^/$ /index.php/
# RedirectTemp cannot be used instead
</IfModule>
</IfModule>