Skip to content
This repository was archived by the owner on Nov 27, 2020. It is now read-only.

Commit e22025f

Browse files
committed
bug #698 Add RewriteRule (jeremy.derusse)
This PR was merged into the 2.3 branch. Discussion ---------- Add RewriteRule | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | should not | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony/symfony#9295 | License | MIT | Doc PR | NA Actually, Apache does not sets "HTTP_AUTHORIZATION" on bearer authorizations. This PR applies Symfony's recommendations by using a .htaccess to rewrite this header. http://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html Commits ------- 77ee2a8 Add RewriteRule
2 parents 91be4f8 + 77ee2a8 commit e22025f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

web/.htaccess

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ DirectoryIndex app.php
1818
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
1919
RewriteRule ^(.*) - [E=BASE:%1]
2020

21+
# Sets the HTTP_AUTHORIZATION header removed by apache
22+
RewriteCond %{HTTP:Authorization} .
23+
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
24+
2125
# Redirect to URI without front controller to prevent duplicate content
2226
# (with and without `/app.php`). Only do this redirect on the initial
2327
# rewrite by Apache and not on subsequent cycles. Otherwise we would get an

0 commit comments

Comments
 (0)