How to customize response headers in nginx
黄舟
黄舟 2017-05-16 17:16:12
0
1
710

I just want to add custom fields to the response header

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
曾经蜡笔没有小新

add_header 'Some-header' 'someValue';

I think you can find a bunch of answers to this question in a hundred searches. .
But if I ask here again, I must have encountered other problems. .

Warm reminder of a pitfall. For response headers defined by nginx, remember not to use underscores. When taking this header, in some languages, such as PHP.
What you define isSome-header,取是取HTTP_SOME_HEADER

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template