port frontend changes from different project

This commit is contained in:
2024-01-09 15:54:34 -05:00
parent e27ac4b81f
commit 9dab26b122
31 changed files with 1062 additions and 574 deletions

View File

@ -76,10 +76,12 @@ if not cfg.billing.standalone:
Route("/request/", billing.handle_billing_request, methods=["POST"]),
]
if not cfg.frontend.standalone:
if not cfg.frontend.standalone and cfg.frontend.secret:
frontend = FrontendServlet(cfg, cfg_dir)
route_lst += frontend.get_routes()
else:
if not cfg.frontend.secret:
logger.error("Frontend secret not specified, cannot start frontend!")
route_lst.append(Route("/", dummy_rt))
route_lst.append(Route("/robots.txt", FrontendServlet.robots))