mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 15:38:55 +01:00
Revert KHOJ_DOMAIN to only support single domain.
Multiple domain support didn't generalize to other portions where it is used
This commit is contained in:
parent
4110e71e84
commit
8fc7f980aa
1 changed files with 2 additions and 7 deletions
|
@ -3,7 +3,6 @@
|
|||
"""
|
||||
|
||||
from contextlib import redirect_stdout
|
||||
import itertools
|
||||
import logging
|
||||
import io
|
||||
import os
|
||||
|
@ -67,13 +66,9 @@ else:
|
|||
django_app = get_asgi_application()
|
||||
|
||||
# Add CORS middleware
|
||||
KHOJ_DOMAIN = os.getenv("KHOJ_DOMAIN", "app.khoj.dev").split(",")
|
||||
KHOJ_DOMAIN = os.getenv("KHOJ_DOMAIN", "app.khoj.dev")
|
||||
scheme = "https" if not is_env_var_true("KHOJ_NO_HTTPS") else "http"
|
||||
custom_origins = list(
|
||||
itertools.chain.from_iterable(
|
||||
[[f"{scheme}://{domain.strip()}", f"{scheme}://{domain.strip()}:*"] for domain in KHOJ_DOMAIN]
|
||||
)
|
||||
)
|
||||
custom_origins = [f"{scheme}://{KHOJ_DOMAIN.strip()}", f"{scheme}://{KHOJ_DOMAIN.strip()}:*"]
|
||||
default_origins = [
|
||||
"app://obsidian.md", # To allow access from Obsidian desktop app
|
||||
"capacitor://localhost", # To allow access from Obsidian iOS app using Capacitor.JS
|
||||
|
|
Loading…
Reference in a new issue