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

Session Cookie is not being set via remote server #27

Closed
jerryharrison opened this issue Aug 23, 2014 · 2 comments
Closed

Session Cookie is not being set via remote server #27

jerryharrison opened this issue Aug 23, 2014 · 2 comments
Labels
non issue Issue is not a problem or requires changes

Comments

@jerryharrison
Copy link

I have a thorax client app that is hosted on a static server. It needs to be accessible from various subdomains (foo.example.com, bar.example.com, baz.example.com). Each of the subdomains loads the same static files/thorax app.

I have a hapi.js app running on api.example.com with auth-cookie scheme in place.

My issue is having foo.example.com perform a login request and having api.example.com set the cookie for the session to be recognized on the server side in following request to protected endpoints.

If I make the request from foo.example.com to foo.example.com/login the cookie is set and the session works. However, this is not suitable for production. We need to have a static server serve up the thorax app and the hapi server manage sessions and endpoints.

I have CORS setup as such:

    cors: {
      matchOrigin: true,
      isOriginExposed: false,
      headers: ['Authorization', 'Content-Type', 'If-None-Match'],
      maxAge: Math.round(86400 * (365/12)),
      methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS']
    },

Any advice or help would be great appreciated!

Thanks.

@jerryharrison jerryharrison changed the title Session Cookie is not being set on remote server Session Cookie is not being set via remote server Aug 23, 2014
@jerryharrison
Copy link
Author

User error.

@arb arb added the non-issue label Aug 24, 2014
@lock
Copy link

lock bot commented Jan 9, 2020

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.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
non issue Issue is not a problem or requires changes
Projects
None yet
Development

No branches or pull requests

2 participants