Apache2.4的Authorization http header
作者:vergil 发布时间:June 15, 2017 分类:php
今天在服务器部署一个API服务时无法进行OAuth2认证。
我的服务器环境是Nginx(php-fpm)+Apache2.4。经过排查,发现被Apache去掉了Authorization
HTTP header。
在Apache的配置文件httpd.conf
或.htaccess
添加以下配置即可:
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
参考网址:https://stackoverflow.com/questions/37158714/enable-apache-http-authorization-header