add localhost and tubearchivist to default trusted
This commit is contained in:
parent
4473e9c5b2
commit
c395a949cc
|
@ -138,8 +138,14 @@ def is_shorts(youtube_id: str) -> bool:
|
||||||
|
|
||||||
def ta_host_parser(ta_host: str) -> tuple[list[str], list[str]]:
|
def ta_host_parser(ta_host: str) -> tuple[list[str], list[str]]:
|
||||||
"""parse ta_host env var for ALLOWED_HOSTS and CSRF_TRUSTED_ORIGINS"""
|
"""parse ta_host env var for ALLOWED_HOSTS and CSRF_TRUSTED_ORIGINS"""
|
||||||
allowed_hosts: list[str] = []
|
allowed_hosts: list[str] = [
|
||||||
csrf_trusted_origins: list[str] = []
|
"localhost",
|
||||||
|
"tubearchivist",
|
||||||
|
]
|
||||||
|
csrf_trusted_origins: list[str] = [
|
||||||
|
"http://localhost",
|
||||||
|
"http://tubearchivist",
|
||||||
|
]
|
||||||
for host in ta_host.split():
|
for host in ta_host.split():
|
||||||
host_clean = host.strip()
|
host_clean = host.strip()
|
||||||
if not host_clean.startswith("http"):
|
if not host_clean.startswith("http"):
|
||||||
|
|
Loading…
Reference in New Issue