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

Add ability to pass the path option in cookieAuth.set(...) #158

JoshBarr opened this Issue May 3, 2017 · 2 comments


None yet
3 participants

JoshBarr commented May 3, 2017

My use case is an application mounted at a path behind a reverse proxy. The path is only known to the app at runtime, so it would be neat to be able to pass in the cookie's path as an option, eg:

request.cookieAuth.set(session, {data}, { path: request.headers['x-forwarded-path'] })

Happy to add this functionality in a PR if you are comfortable with the change :)


This comment has been minimized.

tranan89 commented May 28, 2018

@mrlannigan Why haven't you responded to this? Is there any reason not to?
We need it badly as well and is thinking about forking now.


This comment has been minimized.


mrlannigan commented May 28, 2018

Hi @JoshBarr and @tranan89 ,

If I understand your request correctly, you need the path of the cookie to be set to the forwarded host name received in the headers from the proxy in front of your hapi service? If so, I'm all for it. PR is more than welcomed.

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