Add an API-only mode that hides the server's web UI. Closes #111

This commit is contained in:
Ian Renton
2026-06-09 10:38:16 +01:00
parent cd40cd985d
commit cd30fc765b
17 changed files with 108 additions and 62 deletions

View File

@@ -3,7 +3,7 @@ from datetime import datetime
import pytz
import tornado
from core.config import ALLOW_SPOTTING, WEB_UI_OPTIONS, BASE_URL
from core.config import ALLOW_SPOTTING, WEB_UI_OPTIONS, BASE_URL, SERVER_OWNER_CALLSIGN
from core.constants import SOFTWARE_VERSION
from core.prometheus_metrics_handler import page_requests_counter
@@ -26,7 +26,8 @@ class PageTemplateHandler(tornado.web.RequestHandler):
page_requests_counter.inc()
# Load named template, and provide variables used in templates
self.render(self._template_name + ".html", software_version=SOFTWARE_VERSION, allow_spotting=ALLOW_SPOTTING,
self.render(self._template_name + ".html", software_version=SOFTWARE_VERSION,
server_owner_callsign=SERVER_OWNER_CALLSIGN, allow_spotting=ALLOW_SPOTTING,
web_ui_options=WEB_UI_OPTIONS, baseurl=BASE_URL, current_path=self.request.path,
has_hamqsl=self._has_hamqsl, has_noaa_forecast=self._has_noaa_forecast,
has_giro_ionosonde=self._has_giro_ionosonde)