Request headers bag is missing Authorization header in Symfony 2?

前端 未结 8 1502
别那么骄傲
别那么骄傲 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:45

    Akambi's answer didn't work for me, but found this answer in the php website:

    "Workaround for missing Authorization header under CGI/FastCGI Apache:

    SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
    

    Now PHP should automatically declare $_SERVER[PHP_AUTH_*] variables if the client sends the Authorization header."

    Thanks derkontrollfreak+9hy5l!

提交回复
热议问题