diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-10-13 12:05:08 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-10-13 12:05:08 +0200 |
commit | b6f678a5a1d15acf284ebcec16c905e976671ce1 (patch) | |
tree | 33c7da831482ed79c44896ef19c73c72ada84f2e /.htaccess | |
parent | b14687036b9b800681197f51fdc47e62f0c88e2e (diff) | |
parent | 1c1520b6b98ab20201bfe15577782a52320339df (diff) | |
download | Shaarli-b6f678a5a1d15acf284ebcec16c905e976671ce1.tar.gz Shaarli-b6f678a5a1d15acf284ebcec16c905e976671ce1.tar.zst Shaarli-b6f678a5a1d15acf284ebcec16c905e976671ce1.zip |
Merge branch 'v0.12' into latest
Diffstat (limited to '.htaccess')
-rw-r--r-- | .htaccess | 23 |
1 files changed, 6 insertions, 17 deletions
@@ -7,31 +7,20 @@ RewriteEngine On | |||
7 | RewriteRule ^(.git|doxygen|vendor) - [F] | 7 | RewriteRule ^(.git|doxygen|vendor) - [F] |
8 | 8 | ||
9 | # Forward the "Authorization" HTTP header | 9 | # Forward the "Authorization" HTTP header |
10 | # fixes JWT token not correctly forwarded on some Apache/FastCGI setups | ||
10 | RewriteCond %{HTTP:Authorization} ^(.*) | 11 | RewriteCond %{HTTP:Authorization} ^(.*) |
11 | RewriteRule .* - [e=HTTP_AUTHORIZATION:%1] | 12 | RewriteRule .* - [e=HTTP_AUTHORIZATION:%1] |
13 | # Alternative (if the 2 lines above don't work) | ||
14 | # SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0 | ||
12 | 15 | ||
13 | # REST API | 16 | # REST API |
17 | # Ionos Hosting needs RewriteBase / | ||
18 | # RewriteBase / | ||
14 | RewriteCond %{REQUEST_FILENAME} !-f | 19 | RewriteCond %{REQUEST_FILENAME} !-f |
15 | RewriteCond %{REQUEST_FILENAME} !-d | 20 | RewriteCond %{REQUEST_FILENAME} !-d |
16 | RewriteRule ^ index.php [QSA,L] | 21 | RewriteRule ^ index.php [QSA,L] |
17 | 22 | ||
18 | <Limit GET POST PUT DELETE OPTIONS> | 23 | <LimitExcept GET POST PUT DELETE PATCH OPTIONS> |
19 | <IfModule version_module> | ||
20 | <IfVersion >= 2.4> | ||
21 | Require all granted | ||
22 | </IfVersion> | ||
23 | <IfVersion < 2.4> | ||
24 | Allow from all | ||
25 | Deny from none | ||
26 | </IfVersion> | ||
27 | </IfModule> | ||
28 | |||
29 | <IfModule !version_module> | ||
30 | Require all granted | ||
31 | </IfModule> | ||
32 | </Limit> | ||
33 | |||
34 | <LimitExcept GET POST PUT DELETE OPTIONS> | ||
35 | <IfModule version_module> | 24 | <IfModule version_module> |
36 | <IfVersion >= 2.4> | 25 | <IfVersion >= 2.4> |
37 | Require all denied | 26 | Require all denied |