Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set-Cookie headers in headersOut are not accessible #298

Closed
kepuss opened this issue Mar 17, 2020 · 8 comments
Closed

Set-Cookie headers in headersOut are not accessible #298

kepuss opened this issue Mar 17, 2020 · 8 comments

Comments

@kepuss
Copy link

kepuss commented Mar 17, 2020

Hi,
I have a problem to access Set-Cookie headers (I got 5 of them in response) from reply.headersOut.
I can only read the first one.
When I use the loop to display all headers:

for (var h in reply.headersOut) {
  headers[h] = reply.headersOut[h];
}

I get 5 times first header.
I saw the same question a few months ago #240
I'm using nginx-plus-module-njs 0.3.7
Have you introduced any method to access those headers?

@xeioex
Copy link
Contributor

xeioex commented Mar 17, 2020

@kepuss

Have you introduced any method to access those headers?

not yet. We plan to introduced a special interface for cookies after #16 is done in 0.4.0.

@xeioex
Copy link
Contributor

xeioex commented Mar 19, 2020

@kepuss

As a workaround, you can access upstream cookies using reply.variables['upstream_cookie_' + <cookie name>] (link).

@xeioex
Copy link
Contributor

xeioex commented Mar 19, 2020

Will be done as a part of #266.

@xeioex xeioex closed this as completed Mar 19, 2020
@kepuss
Copy link
Author

kepuss commented Mar 19, 2020

Thanks @xeioex
Any rough estimate when it will be released?

@xeioex
Copy link
Contributor

xeioex commented Mar 20, 2020

@kepuss I plan to release it as a part of 0.4.0 (the beginning of April) or 0.4.1 (May).

@joshgibs
Copy link

joshgibs commented Apr 6, 2020

Hello @xeioex do you have any concrete timelines for the release of the set-cookie fix?

@xeioex
Copy link
Contributor

xeioex commented Apr 6, 2020

@joshgibs the patch is currently in queue for review.
BTW, you can test it: https://gist.github.com/xeioex/8c287bfc1353f5e30decff8920ea0cb4.

We plan to release 0.4.0 on 21.04.2020.

@xeioex
Copy link
Contributor

xeioex commented Apr 23, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants