mirror of
https://github.com/open-webui/open-webui
synced 2025-02-18 02:57:02 +00:00
Add WEBUI_SESSION_COOKIE-settings missing from merge conflict
This commit is contained in:
parent
b888ee17ff
commit
9ad07ad0ce
@ -28,6 +28,7 @@ from open_webui.config import (
|
|||||||
OAUTH_ADMIN_ROLES, WEBHOOK_URL, JWT_EXPIRES_IN, AppConfig,
|
OAUTH_ADMIN_ROLES, WEBHOOK_URL, JWT_EXPIRES_IN, AppConfig,
|
||||||
)
|
)
|
||||||
from open_webui.constants import ERROR_MESSAGES
|
from open_webui.constants import ERROR_MESSAGES
|
||||||
|
from open_webui.env import WEBUI_SESSION_COOKIE_SAME_SITE, WEBUI_SESSION_COOKIE_SECURE
|
||||||
from open_webui.utils.misc import parse_duration
|
from open_webui.utils.misc import parse_duration
|
||||||
from open_webui.utils.utils import get_password_hash, create_token
|
from open_webui.utils.utils import get_password_hash, create_token
|
||||||
from open_webui.utils.webhook import post_webhook
|
from open_webui.utils.webhook import post_webhook
|
||||||
@ -234,6 +235,8 @@ class OAuthManager:
|
|||||||
key="token",
|
key="token",
|
||||||
value=jwt_token,
|
value=jwt_token,
|
||||||
httponly=True, # Ensures the cookie is not accessible via JavaScript
|
httponly=True, # Ensures the cookie is not accessible via JavaScript
|
||||||
|
samesite=WEBUI_SESSION_COOKIE_SAME_SITE,
|
||||||
|
secure=WEBUI_SESSION_COOKIE_SECURE,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Redirect back to the frontend with the JWT token
|
# Redirect back to the frontend with the JWT token
|
||||||
|
Loading…
Reference in New Issue
Block a user