diff --git a/app.py b/app.py index 3c2e71b..7fe9a02 100644 --- a/app.py +++ b/app.py @@ -5914,6 +5914,33 @@ async def saasshorts_post_to_socials(req: SaaSPostRequest, request: Request): raise HTTPException(status_code=500, detail=str(e)) +# The gallery and the per-video pages are rendered by this API service, but the +# app they advertise lives on www. A relative href on `api.` host resolves +# against `api.`, where `/` is not the app (it is a 404), so every link that +# crosses hosts is written absolute. `www.openshorts.app/gallery` and +# `/video/...` 301 to the api host (dashboard/nginx.conf), so the api host is +# the final domain for those two and the app host is final for everything else. +APP_HOST = "https://www.openshorts.app" +GALLERY_HOST = "https://api.openshorts.app" + + +def _json_ld(payload: dict) -> str: + """Serialise a JSON-LD payload for an inline