Forum: NGINX add_header with 40x

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
1f63dadb857637a35df3fa553f67a5a7?d=identicon&s=25 Josh Turmel (Guest)
on 2009-03-08 19:02
(Received via mailing list)
Does anyone know if there are plans to allow the add_header directive to
work with 40x errors?

Right now on one of our sites we are build an API and I have setup rules
in
the NGINX configuration to check the request_method and if it is not one
of
the allowed one's then return a 405 HTTP response, the problem is by
HTTP
1.1 spec you are required to return an Allow header with the list of
allowed
methods when returning a 405.  The obvious problem is add_header in
NGINX
currently only supports using add_header on 200, 204, 301, 302 or 304.

Thoughts anyone?

Thank you,
Josh
This topic is locked and can not be replied to.