Skip to content

fix: update secure cookie handling to use request scheme in chat and login endpoints - #6547

Merged
wxg0103 merged 1 commit into
v2from
pr@v2@fix_secure
Jul 30, 2026
Merged

fix: update secure cookie handling to use request scheme in chat and login endpoints#6547
wxg0103 merged 1 commit into
v2from
pr@v2@fix_secure

Conversation

@shaohuzhang1

Copy link
Copy Markdown
Contributor

fix: update secure cookie handling to use request scheme in chat and login endpoints

Copilot AI review requested due to automatic review settings July 30, 2026 09:49
@shaohuzhang1

Copy link
Copy Markdown
Contributor Author

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@wxg0103
wxg0103 merged commit d56db5d into v2 Jul 30, 2026
5 of 7 checks passed
@wxg0103
wxg0103 deleted the pr@v2@fix_secure branch July 30, 2026 09:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates how the mk_file_auth cookie’s secure flag is determined in the login and chat authentication endpoints, basing it directly on the incoming request’s scheme.

Changes:

  • Use request.scheme == "https" when setting the secure attribute for mk_file_auth in the admin login endpoint.
  • Use request.scheme == "https" when setting the secure attribute for mk_file_auth in the chat anonymous authentication endpoint.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
apps/users/views/login.py Sets mk_file_auth cookie secure based on request.scheme in the login response.
apps/chat/views/chat.py Sets mk_file_auth cookie secure based on request.scheme in the chat auth response.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants