Skip to content

Commit

Permalink
Modified example for mod_rewrite to not add Authorization header if i…
Browse files Browse the repository at this point in the history
…t is not set in the request
  • Loading branch information
Even André Fiskvik committed May 22, 2012
1 parent 517ae43 commit 0935964
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Symfony/Component/HttpFoundation/ServerBag.php
Expand Up @@ -44,11 +44,13 @@ public function getHeaders()
} else {
/*
* php-cgi under Apache does not pass HTTP Basic user/pass to PHP by default
* For this workaround to work, add this line to your .htaccess file:
* For this workaround to work, add these lines to your .htaccess file:
* RewriteCond %{HTTP:Authorization} ^(.+)$
* RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
*
* A sample .htaccess file:
* RewriteEngine On
* RewriteCond %{HTTP:Authorization} ^(.+)$
* RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
* RewriteCond %{REQUEST_FILENAME} !-f
* RewriteRule ^(.*)$ app.php [QSA,L]
Expand Down

0 comments on commit 0935964

Please sign in to comment.