Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: news.aesthetic.computer styling — asset origin was empty in prod

The dev flag was suppressing the asset origin, causing CSS/JS paths to
be relative. On the news subdomain, those resolve to the wrong host.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+5 -2
+5 -2
system/netlify/functions/news.mjs
··· 923 923 return respondFn(405, { error: "Method not allowed" }); 924 924 } 925 925 926 - const basePath = isSubdomainRequest(event) ? "" : "/news.aesthetic.computer"; 926 + const isSub = isSubdomainRequest(event); 927 + const basePath = isSub ? "" : "/news.aesthetic.computer"; 927 928 const assetBase = "/news.aesthetic.computer"; 928 929 const host = event.headers?.host || ""; 929 930 const isLocalHost = host.includes("localhost") || host.startsWith("127.0.0.1") || host.startsWith("0.0.0.0"); 930 - const assetOrigin = dev || isLocalHost ? "" : "https://aesthetic.computer"; 931 + // Only skip origin on localhost; subdomain requests always need the 932 + // full origin since news.aesthetic.computer doesn't serve static files. 933 + const assetOrigin = isLocalHost ? "" : "https://aesthetic.computer"; 931 934 const route = parseRoute(event); 932 935 console.log("[news] Route debug:", { path: event.path, queryStringParameters: event.queryStringParameters, parsedRoute: route }); 933 936 let title = "Aesthetic News";