Skip to content

Commit 6735384

Browse files
authored
Merge pull request #611 from topcoder-platform/issues-520
Issues-520: Pass Authorization header to PHP env
2 parents a939945 + ae129ba commit 6735384

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

vanilla/.htaccess

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@
4747
RewriteCond %{ENV:REDIRECT_X_REWRITE} .+
4848
RewriteCond %{ENV:REDIRECT_X_PATH_INFO} (.+)
4949
RewriteRule ^index\.php - [E=X_REWRITE:1,E=!REDIRECT_X_REWRITE,E=X_PATH_INFO:%1,E=!REDIRECT_X_PATH_INFO,L]
50+
51+
####
52+
# Pass Authorization header to php environment variable to support API authentication
53+
####
54+
<IfModule mod_setenvif.c>
55+
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
56+
</IfModule>
5057
</IfModule>
5158

5259
<IfModule mod_headers.c>

0 commit comments

Comments
 (0)