]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - .htaccess
Merge pull request #1556 from kcaran/apache_methods
[github/shaarli/Shaarli.git] / .htaccess
index b238854c7929d911bb7dc1b5093e29dfbee7cd46..af2dc5a7ff24a244d731a5d2382dc496f62d1eda 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -7,6 +7,7 @@ RewriteEngine On
 RewriteRule ^(.git|doxygen|vendor) - [F]
 
 # Forward the "Authorization" HTTP header
+# fixes JWT token not correctly forwarded on some Apache/FastCGI setups
 RewriteCond %{HTTP:Authorization} ^(.*)
 RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
 
@@ -15,9 +16,18 @@ RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule ^ index.php [QSA,L]
 
-<Limit GET POST PUT DELETE OPTIONS>
-    Require all granted
-</Limit>
-<LimitExcept GET POST PUT DELETE OPTIONS>
+<LimitExcept GET POST PUT DELETE PATCH OPTIONS>
+  <IfModule version_module>
+    <IfVersion >= 2.4>
+       Require all denied
+    </IfVersion>
+    <IfVersion < 2.4>
+       Allow from none
+       Deny from all
+    </IfVersion>
+  </IfModule>
+
+  <IfModule !version_module>
     Require all denied
+  </IfModule>
 </LimitExcept>