BlueGit

projects-timfalken-com verhalenboek

Geef de Authorization-header door aan PHP (Apache/PHP-FPM strippen hem)

timfa Tim Falken · pushed by timfa

Authored 2026-10-05 · 6 weeks ago

Hash
7f344e7ceea143b8a6918bd7eab923041fde1d75
Parent
8e3ad464
1 file changed +10 −0
web/.htaccess +10 −0
@@ -1,5 +1,15 @@
1 1 Options -Indexes
2 2 DirectoryIndex index.php
3
4 # Apache/PHP-FPM strips the Authorization header by default; pass it to PHP for Bearer API keys.
5 <IfModule mod_rewrite.c>
6 RewriteEngine On
7 RewriteCond %{HTTP:Authorization} .
8 RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
9 </IfModule>
10 <IfModule mod_setenvif.c>
11 SetEnvIf Authorization "(.+)" HTTP_AUTHORIZATION=$1
12 </IfModule>
3 13 <FilesMatch "^(README\.md|router\.php)$">
4 14 Require all denied
5 15 </FilesMatch>
@@ -1,5 +1,15 @@
1Options -Indexes
1Options -Indexes
2DirectoryIndex index.php
2DirectoryIndex index.php
3
4# Apache/PHP-FPM strips the Authorization header by default; pass it to PHP for Bearer API keys.
5<IfModule mod_rewrite.c>
6 RewriteEngine On
7 RewriteCond %{HTTP:Authorization} .
8 RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
9</IfModule>
10<IfModule mod_setenvif.c>
11 SetEnvIf Authorization "(.+)" HTTP_AUTHORIZATION=$1
12</IfModule>
3<FilesMatch "^(README\.md|router\.php)$">
13<FilesMatch "^(README\.md|router\.php)$">
4 Require all denied
14 Require all denied
5</FilesMatch>
15</FilesMatch>