hapijs / cookie

Cookie authentication plugin
Other
229 stars 100 forks source link

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

Closed JoshBarr closed 5 years ago

JoshBarr commented 7 years ago

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 :)

tranan89 commented 6 years ago

@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.

mrlannigan commented 6 years ago

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.

hueniverse commented 5 years ago

Seems like this is no longer wanted since no one has submitted a PR. Feel free to open a new issue or PR with this enhancement.

lock[bot] commented 4 years ago

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.