Skip to content

Disable secure cookies by default - #46

Open
adamc00 wants to merge 2 commits into
netsandbox:mainfrom
logicly-au:feature/disable-secure-cookies
Open

adamc00 wants to merge 2 commits into
netsandbox:mainfrom
logicly-au:feature/disable-secure-cookies

Conversation

@adamc00

@adamc00 adamc00 commented Nov 5, 2026 •

Copy link
Copy Markdown

I was unable to get past the login page on a fresh instance using the hosted images. The logs indicated a successful authentication however the login page was re-displayed rather than the logged in landing page.

Setting $WebSecureCookies to 0 resolved this problem for me. It seems that browsers, or some browsers, honour the secure flag on cookies even for localhost. I believe this was the cause of the following closed issues: #35, #33 and #30.

In this PR I added a new RT_WEB_SECURE_COOKIES environment variable to configure RT's $WebSecureCookies variable and defaulted it to 0 as this seems like the sensible default for development.

The ./update.sh script was run to apply this change across versions.

Let me know if this is the wrong approach. I'd be pleased to provide an alternative fix if so.

@netsandbox

Copy link
Copy Markdown
Owner

I can not reproduce the problem that this PR should fix.

Can you please share your command to run the container from this image.

@netsandbox netsandbox self-assigned this Nov 9, 2026
@netsandbox
netsandbox self-requested a review November 9, 2026 20:20
@adamc00

adamc00 commented Nov 10, 2026

Copy link
Copy Markdown
Author

Can you please share your command to run the container from this image.

docker run -d --name rt -p 80:80 netsandbox/request-tracker:5.0

My default browser is Safari which strictly honours the secure cookie setting on localhost. I believe this to be a webkit specific behaviour. I tried Orion (webkit) and it behaves the same way. Since receiving your question I've tried Brave, Firefox, Chrome and Edge none of which behave this way. I expect that the users who reported this issue previously were using a webkit based browser. That said, it is very confusing when it does happen.

Given this is a development targeted stack I think my change is appropriate but if you would prefer I could revert the default to secure while still maintaining the mechanism. I would also update the readme to note the issue with Safari and provide an example of how to override the default secure cookies setting. Let me know.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants