rewrite POST into GET?
Mark Slater
lists at humanesoftware.com
Thu Feb 14 13:12:35 MSK 2008
I'm working on a facebook application built using Rails. This is my
first time deploying a Rails site, and I'm setting up Capistrano to do
the heavy lifting. I've got it creating a "down for maintenance" file
that I would like served to all facebook requests when I'm updating
things, but facebook always sends a POST request. This causes Nginx to
respond with a 405 and report "client sent invalid method...";
obviously you can't really POST to a static page.
Is there a way I can re-direct POST requests to GET requests or force
Nginx to return the static page regardless of the method used to
access it? My backup plan is to deploy a second app on a different set
of ports that always returns the "down for maintenance" message....
but it seems silly to run one app to report you're upgrading another.
Thanks!
Mark
More information about the nginx
mailing list