Compare commits

...

2 Commits

Author SHA1 Message Date
5256d4cbbf Fixed typo 2026-02-21 15:44:41 +01:00
238830b779 Move config to example and add root_path support 2026-02-21 15:43:03 +01:00
4 changed files with 14 additions and 2 deletions

3
.gitignore vendored
View File

@@ -14,3 +14,6 @@ venv/
# OS # OS
.DS_Store .DS_Store
Thumbs.db Thumbs.db
# Configuration file
config.yaml

View File

@@ -10,3 +10,4 @@ processing:
server: server:
host: "0.0.0.0" host: "0.0.0.0"
port: 8000 port: 8000
root_path: "/cf-zeiten"

10
main.py
View File

@@ -11,4 +11,12 @@ app.include_router(web_router)
app.mount("/static", StaticFiles(directory="static"), name="static") app.mount("/static", StaticFiles(directory="static"), name="static")
if __name__ == "__main__": 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="*")

View File

@@ -7,7 +7,7 @@
@font-face { @font-face {
font-family: 'BrittanySignature'; font-family: 'BrittanySignature';
src: url('/static/BrittanySignature.woff2') format('woff2'); src: url("{{ url_for('static', path='/BrittanySignature.woff2') }}") format('woff2');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
font-display: swap; /* Verhindert unsichtbaren Text beim Laden */ font-display: swap; /* Verhindert unsichtbaren Text beim Laden */