From 2a840fcc10294a76eb7b254d3c5c1e1ac65dfeb8 Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Tue, 16 Jun 2026 02:10:50 +0530 Subject: [PATCH] refactor(backend): derive frontend and backend urls from SURFSENSE_PUBLIC_URL --- surfsense_backend/app/config/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/surfsense_backend/app/config/__init__.py b/surfsense_backend/app/config/__init__.py index 32ad443bf..5385d12fc 100644 --- a/surfsense_backend/app/config/__init__.py +++ b/surfsense_backend/app/config/__init__.py @@ -535,9 +535,10 @@ class Config: # Platform web search (SearXNG) SEARXNG_DEFAULT_HOST = os.getenv("SEARXNG_DEFAULT_HOST") - NEXT_FRONTEND_URL = os.getenv("NEXT_FRONTEND_URL") + SURFSENSE_PUBLIC_URL = os.getenv("SURFSENSE_PUBLIC_URL") + NEXT_FRONTEND_URL = os.getenv("NEXT_FRONTEND_URL") or SURFSENSE_PUBLIC_URL # Backend URL to override the http to https in the OAuth redirect URI - BACKEND_URL = os.getenv("BACKEND_URL") + BACKEND_URL = os.getenv("BACKEND_URL") or SURFSENSE_PUBLIC_URL # Messaging gateway (Telegram v1) # Global master switch: when FALSE, no gateway supervisors/workers start and all