Forum: NGINX add_header with 40x

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Josh Turmel (Guest)
on 2009-03-08 20: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
the NGINX configuration to check the request_method and if it is not one
the allowed one's then return a 405 HTTP response, the problem is by
1.1 spec you are required to return an Allow header with the list of
methods when returning a 405.  The obvious problem is add_header in
currently only supports using add_header on 200, 204, 301, 302 or 304.

Thoughts anyone?

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