mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +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
|
from contextlib import redirect_stdout
|
||||||
import itertools
|
|
||||||
import logging
|
import logging
|
||||||
import io
|
import io
|
||||||
import os
|
import os
|
||||||
|
@ -67,13 +66,9 @@ else:
|
||||||
django_app = get_asgi_application()
|
django_app = get_asgi_application()
|
||||||
|
|
||||||
# Add CORS middleware
|
# 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"
|
scheme = "https" if not is_env_var_true("KHOJ_NO_HTTPS") else "http"
|
||||||
custom_origins = list(
|
custom_origins = [f"{scheme}://{KHOJ_DOMAIN.strip()}", f"{scheme}://{KHOJ_DOMAIN.strip()}:*"]
|
||||||
itertools.chain.from_iterable(
|
|
||||||
[[f"{scheme}://{domain.strip()}", f"{scheme}://{domain.strip()}:*"] for domain in KHOJ_DOMAIN]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
default_origins = [
|
default_origins = [
|
||||||
"app://obsidian.md", # To allow access from Obsidian desktop app
|
"app://obsidian.md", # To allow access from Obsidian desktop app
|
||||||
"capacitor://localhost", # To allow access from Obsidian iOS app using Capacitor.JS
|
"capacitor://localhost", # To allow access from Obsidian iOS app using Capacitor.JS
|
||||||
|
|
Loading…
Reference in a new issue