mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: add cookie domain setting
This commit is contained in:
parent
2414f47dc1
commit
078ff189ac
4 changed files with 77 additions and 82 deletions
|
|
@ -1,3 +1,5 @@
|
|||
from webbrowser import get
|
||||
from config.config import get_learnhouse_config
|
||||
from pydantic import BaseModel
|
||||
from fastapi import Depends, HTTPException, status
|
||||
from fastapi.security import OAuth2PasswordBearer
|
||||
|
|
@ -19,7 +21,7 @@ class Settings(BaseModel):
|
|||
authjwt_access_token_expires = False # (pre-alpha only) # TODO: set to 1 hour
|
||||
authjwt_cookie_samesite = "lax"
|
||||
authjwt_cookie_secure = True
|
||||
authjwt_cookie_domain = ".localhost"
|
||||
authjwt_cookie_domain = get_learnhouse_config().hosting_config.cookie_config.domain
|
||||
|
||||
|
||||
@AuthJWT.load_config # type: ignore
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue