How to respond correctly to a POST request for a static file?

johnny nginx-forum at
Thu Jan 12 09:06:41 UTC 2012


I have a Facebook app hosted on nginx. Faceboook fetches the data by
issuing a POST request for index.html before embedding it in their
canvas. My server replies with 404, instead of the expected 405. If it
was 405, I could fix things by adding "error_page 405 =200 $uri;" to the
configuration file, but for some reason it's 404. 

I can think of two ways of correcting the situation:
1. Find a way to have the server respond with 405 and then add the above
line. This is probably the correct way.
2. Respond with 200 when a POST request is issued for index.html.

How do I implement either one of these?


Posted at Nginx Forum:,221059,221059#msg-221059

More information about the nginx mailing list