diff --git a/backend/main.py b/backend/main.py index 4fdbfae..8c5b390 100644 --- a/backend/main.py +++ b/backend/main.py @@ -327,16 +327,7 @@ MEDIA_DIR = os.getenv("MEDIA_DIR", "/data/media") os.makedirs(MEDIA_DIR, exist_ok=True) app.mount("/media", StaticFiles(directory=MEDIA_DIR), name="media") -APP_VER = "774" # muss mit APP_VER in app.js übereinstimmen - -@app.get("/.well-known/assetlinks.json") -async def assetlinks(): - """TWA-Verifikation für Google Play Store (app.banyaro.twa).""" - return Response( - content='[{"relation":["delegate_permission/common.handle_all_urls"],"target":{"namespace":"android_app","package_name":"app.banyaro.twa","sha256_cert_fingerprints":["49:02:DC:5B:63:C0:D7:42:7F:A4:DC:2F:EB:78:73:11:CC:B9:36:22:00:01:A0:03:1C:0A:F9:41:35:9F:D4:B7"]}}]', - media_type="application/json", - headers={"Cache-Control": "no-cache"}, - ) +APP_VER = "760" # muss mit APP_VER in app.js übereinstimmen @app.get("/api/version") async def app_version(): @@ -857,7 +848,7 @@ async def share_target(request: Request): # Weiterleitung zur App mit den Daten return FileResponse( f"{STATIC_DIR}/index.html", - headers={"Cache-Control": "no-store, no-cache"} + headers={"Cache-Control": "no-cache"} ) # Öffentliche Hunde-Profilseite (für NFC-Tags, kein Login nötig) @@ -1191,17 +1182,17 @@ async def public_dog_page(dog_id: int): # ------------------------------------------------------------------ @app.get("/teilen/{token}") async def invite_page(token: str): - return FileResponse(f"{STATIC_DIR}/index.html", headers={"Cache-Control": "no-store, no-cache"}) + return FileResponse(f"{STATIC_DIR}/index.html", headers={"Cache-Control": "no-cache"}) @app.get("/breeder/{zwingername}") async def breeder_profile_page(zwingername: str): - return FileResponse(f"{STATIC_DIR}/index.html", headers={"Cache-Control": "no-store, no-cache"}) + return FileResponse(f"{STATIC_DIR}/index.html", headers={"Cache-Control": "no-cache"}) @app.get("/litters") async def litters_page(): - return FileResponse(f"{STATIC_DIR}/index.html", headers={"Cache-Control": "no-store, no-cache"}) + return FileResponse(f"{STATIC_DIR}/index.html", headers={"Cache-Control": "no-cache"}) # ------------------------------------------------------------------ @@ -1209,7 +1200,7 @@ async def litters_page(): # ------------------------------------------------------------------ @app.get("/widget") async def widget_page(): - return FileResponse(f"{STATIC_DIR}/index.html", headers={"Cache-Control": "no-store, no-cache"}) + return FileResponse(f"{STATIC_DIR}/index.html", headers={"Cache-Control": "no-cache"}) # ------------------------------------------------------------------ @@ -1364,14 +1355,7 @@ async def ausweis_page(dog_id: int, request: Request):