我正在使用一个名为 auth_token 的自定义标头,我将其传递给我的 rails 后端。在 localhost / webrick 上,我可以访问:
curl -H "auth_token: r5O_IdqpWStqmJFe0pil0Q" http://localhost:3000
并且可以通过以下方式访问标头值:
auth_token=request.headers["auth_token"] if request.headers["auth_token"].
但是,当我访问登台(nginx /乘客)时:
curl -H "auth_token: r5O_IdqpWStqmJFe0pil0Q" http://staging.domain.com/
它无法访问标头值。我需要对 nginx/passenger 进行任何配置以允许它访问此自定义标头吗?
谢谢