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

feat: Issue-5094: Auto set SESSION_COOKIE_PATH if LABEL_STUDIO_HOST is set #6441

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

kebe7jun
Copy link

@kebe7jun kebe7jun commented Sep 26, 2024

Fix #5094

PR fulfills these requirements

  • Commit message(s) and PR title follows the format [fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made ex. fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
  • Tests for the changes have been added/updated (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
  • Self-reviewed and ran all changes on a local instance (for bug fixes/features)

Change has impacts in these area(s)

(check all that apply)

  • Product design
  • Backend (Database)
  • Backend (API)
  • Frontend

Describe the reason for change

(link to issue, supportive screenshots etc.)

As the Issue description says, we hope to deploy multiple Label Studio instances under the same Host

What does this fix?

(if this is a bug fix)

Django will read the value of SESSION_COOKIE_PATH to set it to PATH, so we only need to set this value

What is the new behavior?

(if this is a breaking or feature change)

After setting LABEL_STUDIO_HOST, the sessionid cookie will be saved to the subpath instead of '/'

What is the current behavior?

(if this is a breaking or feature change)

sessionid cookie's path always be '/'.

What libraries were added/updated?

(list all with version changes)

N/A

Does this change affect performance?

(if so describe the impacts positive or negative)
N/A

Does this change affect security?

(if so describe the impacts positive or negative)

N/A

What alternative approaches were there?

(briefly list any if applicable)

N/A

What feature flags were used to cover this change?

(briefly list any if applicable)

N/A

Does this PR introduce a breaking change?

(check only one)

  • Yes, and covered entirely by feature flag(s)
  • Yes, and covered partially by feature flag(s)
  • No
  • Not sure (briefly explain the situation below)

What level of testing was included in the change?

(check all that apply)

  • e2e
  • integration
  • unit

Which logical domain(s) does this change affect?

(for bug fixes/features, be as precise as possible. ex. Authentication, Annotation History, Review Stream etc.)

Authentication

Copy link

netlify bot commented Sep 26, 2024

👷 Deploy request for heartex-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 301cfde

Copy link

netlify bot commented Sep 26, 2024

👷 Deploy request for label-studio-docs-new-theme pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 301cfde

@github-actions github-actions bot added the feat label Sep 26, 2024
@kebe7jun kebe7jun changed the title feat: Issue-5094: Auto set SESSION_COOKIE_PATH if LABEL_STUDIO_HOST setted feat: Issue-5094: Auto set SESSION_COOKIE_PATH if LABEL_STUDIO_HOST is set Sep 26, 2024
@robot-ci-heartex
Copy link
Collaborator

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

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

Successfully merging this pull request may close these issues.

CSRF and SessionID cookies doesn't have subpath (always using /) when running Label Studio with a subpath
2 participants