nginx add_header not working

后端 未结 8 844
无人共我
无人共我 2020-12-23 16:00

I am having an intriguing problem where whenever I use add_header in my virtual host configuration on an ubuntu server running nginx with PHP and php-fpm it sim

8条回答
  •  醉酒成梦
    2020-12-23 16:43

    Evidently the add_header inheritance quirk/gotcha applies to the upstream layer as well.

    I had a script pre-authorizing requests meant for another service, and was therefore returning all of the headers from the other service.

    Once I started adding an 'Access-Control-Allow-Origin' entry along with these relayed headers, the browser would actually get the entry and allow the request.

提交回复
热议问题