]> git.immae.eu Git - github/shaarli/Shaarli.git/blame_incremental - .htaccess
**General rewording, proof-reading, deduplication, shortening, reordering, simplifica...
[github/shaarli/Shaarli.git] / .htaccess
... / ...
CommitLineData
1# Disable directory listing
2Options -Indexes
3
4RewriteEngine On
5
6# Prevent accessing subdirectories not managed by SCM
7RewriteRule ^(.git|doxygen|vendor) - [F]
8
9# Forward the "Authorization" HTTP header
10# fixes JWT token not correctly forwarded on some Apache/FastCGI setups
11RewriteCond %{HTTP:Authorization} ^(.*)
12RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
13
14# REST API
15RewriteCond %{REQUEST_FILENAME} !-f
16RewriteCond %{REQUEST_FILENAME} !-d
17RewriteRule ^ index.php [QSA,L]
18
19<Limit GET POST PUT DELETE OPTIONS>
20 <IfModule version_module>
21 <IfVersion >= 2.4>
22 Require all granted
23 </IfVersion>
24 <IfVersion < 2.4>
25 Allow from all
26 Deny from none
27 </IfVersion>
28 </IfModule>
29
30 <IfModule !version_module>
31 Require all granted
32 </IfModule>
33</Limit>
34
35<LimitExcept GET POST PUT DELETE OPTIONS>
36 <IfModule version_module>
37 <IfVersion >= 2.4>
38 Require all denied
39 </IfVersion>
40 <IfVersion < 2.4>
41 Allow from none
42 Deny from all
43 </IfVersion>
44 </IfModule>
45
46 <IfModule !version_module>
47 Require all denied
48 </IfModule>
49</LimitExcept>