Welcome! Log In Create A New Profile

Advanced

Re: Rewriting the domain part of Set-Cookie in a proxy_pass

agentzh
September 14, 2011 05:26AM
On Wed, Sep 14, 2011 at 4:49 PM, agentzh <agentzh@gmail.com> wrote:
>    server_name external.domain.com;
>
>    location / {
>        proxy_pass http://backend.int/;
>
>        header_filter_by_lua '
>            local cookies = ngx.header.set_cookie
>            if not cookies then return end

Sorry, one line of Lua should be inserted right here for the case of a
single Set-Cookie response header:

if type(cookies) ~= "table" then cookies = {cookies} end

that is, ngx.header.set_cookie will just return a single Lua string
instead of a Lua table if there's only one Set-Cookie header.

Regards,
-agentzh

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

Rewriting the domain part of Set-Cookie in a proxy_pass

tobia June 08, 2011 09:16AM

Re: Rewriting the domain part of Set-Cookie in a proxy_pass

António P. P. Almeida June 08, 2011 09:36AM

Re: Rewriting the domain part of Set-Cookie in a proxy_pass

tobia June 08, 2011 10:02AM

Re: Rewriting the domain part of Set-Cookie in a proxy_pass

tobia June 08, 2011 10:06AM

Re: Rewriting the domain part of Set-Cookie in a proxy_pass

Justin Cormack June 08, 2011 10:18AM

Re: Rewriting the domain part of Set-Cookie in a proxy_pass

杨镭 June 08, 2011 03:32PM

Re: Rewriting the domain part of Set-Cookie in a proxy_pass

agentzh June 08, 2011 10:10PM

Re: Rewriting the domain part of Set-Cookie in a proxy_pass

tobia June 27, 2011 04:50AM

Re: Rewriting the domain part of Set-Cookie in a proxy_pass

Maxim Dounin June 08, 2011 10:20AM

Re: Rewriting the domain part of Set-Cookie in a proxy_pass

agentzh September 14, 2011 04:50AM

Re: Rewriting the domain part of Set-Cookie in a proxy_pass

agentzh September 14, 2011 05:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 310
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