]> git.immae.eu Git - github/shaarli/Shaarli.git/blame - .htaccess
Merge pull request #1572 from ArthurHoaro/feature/php8
[github/shaarli/Shaarli.git] / .htaccess
CommitLineData
cabf1b6b
V
1# Disable directory listing
2Options -Indexes
3
18e67967 4RewriteEngine On
cabf1b6b
V
5
6# Prevent accessing subdirectories not managed by SCM
7RewriteRule ^(.git|doxygen|vendor) - [F]
8
460cf03d 9# Forward the "Authorization" HTTP header
91a21c27 10# fixes JWT token not correctly forwarded on some Apache/FastCGI setups
460cf03d
V
11RewriteCond %{HTTP:Authorization} ^(.*)
12RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
13
cabf1b6b 14# REST API
18e67967
A
15RewriteCond %{REQUEST_FILENAME} !-f
16RewriteCond %{REQUEST_FILENAME} !-d
17RewriteRule ^ index.php [QSA,L]
6410bf96 18
4488ea4b 19<LimitExcept GET POST PUT DELETE PATCH OPTIONS>
8aca613b
A
20 <IfModule version_module>
21 <IfVersion >= 2.4>
22 Require all denied
23 </IfVersion>
24 <IfVersion < 2.4>
25 Allow from none
26 Deny from all
27 </IfVersion>
28 </IfModule>
29
30 <IfModule !version_module>
6410bf96 31 Require all denied
8aca613b 32 </IfModule>
6410bf96 33</LimitExcept>