Fetching custom Authorization header from incoming PHP request

前端 未结 5 567
春和景丽
春和景丽 2020-12-04 19:47

So I\'m trying to parse an incoming request in PHP which has the following header set:

Authorization: Custom Username

Simple question: how

5条回答
  •  一整个雨季
    2020-12-04 19:58

    For background, why Apache filters away the Authorization header: https://stackoverflow.com/a/17490827

    Solutions depending on which Apache module is used to pass the request to the application:

    mod_wsgi, mod_fcgid:

    • https://stackoverflow.com/a/30310338

    cgi:

    • https://stackoverflow.com/a/38175451

    Other hacks - massaging the headers in this question:

    • Request headers bag is missing Authorization header in Symfony 2?

    • Apache 2.4 + PHP-FPM and Authorization headers

提交回复
热议问题