Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Upstream: support named location for X-Accel-Redirect

November 09, 2014 07:56PM
Hi,

(2014/11/08 0:59), Igor Sysoev wrote:
> On 04 Nov 2014, at 14:18, Toshikuni Fukaya <toshikuni-fukaya@cybozu.co.jp> wrote:
>
>> Upstream: support named location for X-Accel-Redirect.
>
> Could please you provide usage examples?
>
>

Here is my (simplified) config:

server {
location / {
proxy_pass http://app;
}

location @contents {
proxy_pass http://contents/$upstream_http_x_contents_url;
}
}

app is a upstream application server, it processes all client requests.
contents is a some of blob server (like as S3) to supply images, css and
so on.

When clients access to nginx, app will check a some of ACL to such
requests, then reply with x-accel-redirect and x-contents-url headers.
Finally, nginx will return a content from contents upstream.
In this time, x-accel-redirect will be set to @contents and
x-contents-url will be an appropriate content url.

The key of this strategy is that all requests is passed to app and can
be checked by it.
If location @contents is a normal location such as /contents, a client
request to /contents will not be passed app. It is not comfortable for me.

Thanks,
Toshikuni Fukaya

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Upstream: support named location for X-Accel-Redirect

Toshikuni Fukaya 649 November 04, 2014 06:20AM

Re: [PATCH] Upstream: support named location for X-Accel-Redirect

Igor Sysoev 641 November 07, 2014 11:02AM

Re: [PATCH] Upstream: support named location for X-Accel-Redirect

Toshikuni Fukaya 323 November 09, 2014 07:56PM

Re: [PATCH] Upstream: support named location for X-Accel-Redirect

Valentin V. Bartenev 391 November 10, 2014 03:44AM

Re: [PATCH] Upstream: support named location for X-Accel-Redirect

Igor Sysoev 830 November 10, 2014 04:10AM

Re: [PATCH] Upstream: support named location for X-Accel-Redirect

Maxim Dounin 347 November 10, 2014 01:04PM

Re: [PATCH] Upstream: support named location for X-Accel-Redirect

Toshikuni Fukaya 343 November 10, 2014 07:34PM

Re: [PATCH] Upstream: support named location for X-Accel-Redirect

Maxim Dounin 394 November 11, 2014 09:04AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 99
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready