diff --git a/main.py b/main.py index cc9ec27..1098d96 100644 --- a/main.py +++ b/main.py @@ -11,4 +11,12 @@ app.include_router(web_router) app.mount("/static", StaticFiles(directory="static"), name="static") if __name__ == "__main__": - uvicorn.run(app, host=config['server']['host'], port=config['server']['port']) + root_p = config['server'].get('root_path', "") + uvicorn.run( + "main:app", + reload=True, + host=config['server']['host'], + port=config['server']['port'], + root_path=root_p, + proxy_headers=True, # Wichtig für Caddy + forwarded_allow_ips="*") diff --git a/templates/zeiten.html b/templates/zeiten.html index ce535f0..678e8ae 100644 --- a/templates/zeiten.html +++ b/templates/zeiten.html @@ -7,7 +7,7 @@ @font-face { font-family: 'BrittanySignature'; - src: url('/static/BrittanySignature.woff2') format('woff2'); + src: url("{{ url_for('static', path='/BrittanySignature.woff2') }}") format('woff2'); font-weight: normal; font-style: normal; font-display: swap; /* Verhindert unsichtbaren Text beim Laden */