Why the status code restriction on add_header?
Richard Stanway
r1ch+nginx at teamliquid.net
Thu Dec 5 10:54:56 UTC 2013
Hello,
I'm trying to add some custom headers to a 403 response, but had a hard
time doing so. Looking through the docs, it seems add_header "Adds the
specified field to a response header provided that the response code equals
200, 201, 204, 206, 301, 302, 303, 304, or 307. "
I was wondering what the reasoning was behind this pre-set list of status
codes and why it isn't possible for example to add a header to a 403 or 404
response. Also, if there is any workaround that would make this possible,
I'd be interested to hear it.
Thanks,
Rich.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20131205/54dfe9f9/attachment-0001.html>
More information about the nginx
mailing list