Request headers bag is missing Authorization header in Symfony 2?

前端 未结 8 1493
别那么骄傲
别那么骄傲 2020-11-29 01:30

I\'m trying to implement a custom authentication provider in Symfony 2. I\'m sending a test request using Fiddler and printing all headers server side; well, Authoriza

8条回答
  •  南方客
    南方客 (楼主)
    2020-11-29 01:35

    The verified solution worked for me at the time to get the Authorization header through. However, it generated an empty Authorization header when there was none in the incoming request. This is how I solved it:

    RewriteEngine On
    RewriteCond %{HTTP:Authorization} .+
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    

提交回复
热议问题