The Worker connected to ytgenerator.stream was serving a build made for the GitHub Pages sub-path: index.html asked for /youtube-generator/assets/*.js, the SPA fallback answered every one of those with index.html, and the site loaded blank. Both builds are now served from `/`. - vite.config.ts: base "/" for web and Tauri alike. - wrangler.jsonc: the one Cloudflare file in the repo. Assets-only for now (dist/, SPA fallback, custom domain declared so `wrangler deploy` never detaches it, workers.dev off, build.command runs `npm run build`). - public/_headers: CSP, nosniff, Referrer-Policy, Permissions-Policy, COOP, X-Frame-Options; immutable caching for hashed /assets/*. No HSTS - the zone edge already sends it with preload. - index.html, manifest, robots, sitemap: canonical/OG/JSON-LD on the new domain, pt-BR and id added to the locale metadata, Android listed. - Brand: one SVG source in assets/brand/ now drives the favicon, the PWA icons (192/512/maskable), apple-touch-icon, a 1200x630 link-preview card and every Tauri desktop/Android/iOS icon. The desktop and Android apps had been shipping a flat indigo placeholder square; manifest and index.html pointed at four PNGs that did not exist. `npm run generate:brand` re-renders the web images; the Android adaptive icon gets a glyph-only foreground on the brand colour instead of a tile on a white disc. - deploy-web.yml and notify-deploy.yml removed, .nojekyll dropped. The last Pages deployment stays online untouched until the data-migration page replaces it. - .node-version pins Node 22 for Workers Builds; wrangler, @tauri-apps/cli and @resvg/resvg-js are pinned dev dependencies (`npm run cf:dev`, `npm run cf:check` for a dry-run deploy). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
1.5 KiB
Plaintext
31 lines
1.5 KiB
Plaintext
# Response headers for files Cloudflare serves straight out of dist/.
|
|
#
|
|
# Rules are additive: a path matching several blocks gets every header, and a
|
|
# header set twice is joined with a comma — so each header name appears in
|
|
# exactly one block per path. HSTS is intentionally absent: the zone edge
|
|
# already sends `max-age=31536000; includeSubDomains; preload`.
|
|
|
|
/*
|
|
X-Content-Type-Options: nosniff
|
|
Referrer-Policy: strict-origin-when-cross-origin
|
|
Permissions-Policy: accelerometer=(), camera=(), display-capture=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), midi=(), payment=(), usb=(), browsing-topics=()
|
|
Cross-Origin-Opener-Policy: same-origin
|
|
X-Frame-Options: DENY
|
|
Content-Security-Policy: default-src 'self'; script-src 'self' https://static.cloudflareinsights.com; connect-src 'self' https://cloudflareinsights.com; img-src 'self' data: blob:; style-src 'self' 'unsafe-inline'; font-src 'self' data:; manifest-src 'self'; worker-src 'self'; object-src 'none'; base-uri 'none'; form-action 'self'; frame-ancestors 'none'; upgrade-insecure-requests
|
|
|
|
# Content-hashed build output: safe to cache forever.
|
|
/assets/*
|
|
Cache-Control: public, max-age=31536000, immutable
|
|
Cross-Origin-Resource-Policy: same-origin
|
|
|
|
/icons/*
|
|
Cache-Control: public, max-age=604800
|
|
|
|
# Link-preview crawlers and chat apps embed this from other origins.
|
|
/og-image.png
|
|
Cache-Control: public, max-age=86400
|
|
Cross-Origin-Resource-Policy: cross-origin
|
|
|
|
/manifest.webmanifest
|
|
Content-Type: application/manifest+json; charset=utf-8
|