I’d like for my application to send a 302 redirect (or equivalent) to an
off-domain location (not my server). X-Accel-Redirect appears to be the
best way to achieve this, but I don’t see any reference to the URI being
a reference to a different server.
On Thu, Apr 14, 2011 at 01:36:56AM -0400, dbanks wrote:
Hi there,
I’d like for my application to send a 302 redirect (or equivalent) to an
off-domain location (not my server). X-Accel-Redirect appears to be the
best way to achieve this, but I don’t see any reference to the URI being
a reference to a different server.
X-Accel-Redirect is for the application to tell nginx to return the
content of a different (local) uri. The value should start with “/”.
Nginx is a proxy server, so there are ways to map a local uri to a
remote
resource, but that seems to be a side issue here:
if you want your application to send a 302 redirect, just send a 302
redirect. You’ll need a valid Location: header too.
it would be nice to support this. it’s basically dynamic/reproxy
capabilities, which is what is in perlbal, which is needed for
mogilefs support. I thought nginx had something like this internally,
or perhaps Valery figured out a neat way in his mogilefs module.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.