-
Notifications
You must be signed in to change notification settings - Fork 41.9k
Open
Labels
for: team-meetingAn issue we'd like to discuss as a team to make progressAn issue we'd like to discuss as a team to make progressstatus: waiting-for-triageAn issue we've not yet triagedAn issue we've not yet triaged
Description
Problem
Session cookies are scoped by host and path only, not by port. Running multiple apps on localhost on different ports (e.g. 8080 and 8081) shares the same cookies, so one app’s session cookie can override the other’s (e.g. logging into one app logs you out of another).
Workarounds and drawbacks
There are a few workarounds that can be used:
- Developers can use different hosts (127.0.0.1, localhost, 192.168.x.x). The problem with this is that you have to remember host and port per app. Beyond a couple of apps it gets fragile without editing the hosts file.
- Unique session cookie name (e.g.
SESSION_${server.port}). This works well, but requires explicit configuration that should not be required.
Proposed solution
When DevTools is on the classpath, automatically make the default session cookie name unique in development (e.g. suffix with server port, like SESSION_8081), so multiple apps on localhost with different ports don’t overwrite each other’s session.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
for: team-meetingAn issue we'd like to discuss as a team to make progressAn issue we'd like to discuss as a team to make progressstatus: waiting-for-triageAn issue we've not yet triagedAn issue we've not yet triaged