fix: skip Secure cookie flag for admin session on localhost#130
Closed
jkleinne wants to merge 1 commit intoBigBodyCobain:mainfrom
Closed
fix: skip Secure cookie flag for admin session on localhost#130jkleinne wants to merge 1 commit intoBigBodyCobain:mainfrom
jkleinne wants to merge 1 commit intoBigBodyCobain:mainfrom
Conversation
The admin session cookie is set with `secure: true` when NODE_ENV=production. Since the Docker image runs in production mode, browsers silently drop the cookie over plain HTTP, making the API Keys panel and other admin-gated settings inaccessible on localhost.
Author
|
Closing - this was fixed upstream in ea457f2. Thanks for the quick turnaround! Happy the issue report helped surface it. |
Owner
|
I wish I saw this earlier. I just literally fixed this. THank you though! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #129 — the admin session cookie's
Secureflag prevents it from being sent over plain HTTP on localhost, making the API Keys panel (and other admin-gated settings) inaccessible for self-hosted users.isLoopback()helper that checks if the request'sHostheader islocalhost,127.0.0.1, or::1cookieOptions()so it can skip theSecureflag on loopbackSecureis still set in productionTest plan
Secureflag onhttp://localhost:3000Secureflag when accessed via non-loopback hostname