fix(pwa): drop the retired demo URL from backend CORS and og:url defaults

The public demo deployment is paused for good, so the production CLIENT_URL
fallback allowed an origin nobody can reach — a manual (non-Docker) self-host
failed every provider request with a CORS error. Default to the documented
http://localhost:4333 instead, and point og:url at the project website.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Opus 5 committed 2026-08-22 09:58:06 +02:00
1 parent 2d8e8d77cb
commit cb37f628ed
3 files changed
+14 -2

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
---
type: fix
area: pwa
---
Self-hosted web backends started without `CLIENT_URL` now allow the documented
`http://localhost:4333` origin instead of the retired public demo URL, so a
manual (non-Docker) deployment no longer fails every provider request with a
CORS error.
+4 -1
View File
@@ -575,10 +575,13 @@ function getClientOrigins(): string[] {
return configured;
}
// Production default matches the documented self-hosted setup
// (docker/docker-compose.yml maps the PWA to port 4333). The Docker image
// sets CLIENT_URL explicitly; this fallback only covers manual runs.
return process.env['NODE_ENV'] === 'development' ||
process.env['NODE_ENV'] === 'dev'
? ['http://localhost:4200']
: ['https://iptvnator.vercel.app'];
: ['http://localhost:4333'];
}
function getQueryString(req: Request, key: string): string | undefined {
+1 -1
View File
@@ -12,7 +12,7 @@
/>
<meta property="og:type" content="website" />
<meta property="og:title" content="IPTVnator" />
<meta property="og:url" content="https://iptvnator.vercel.app" />
<meta property="og:url" content="https://4gray.github.io/iptvnator/" />
<meta
property="og:image"
content="https://raw.githubusercontent.com/4gray/iptvnator/electron/iptv-dark-theme.png"