PR #70
17 votes · 16 up · 1 down
Comments(12)
Would it be possible to change the style to ASCII so it matches the current theme? It sticks out a lot at the moment
Is "Controll" an intended misspelling (to include "troll" perhaps), or a typo?
@hpinsley It works locally because localhost is exempt from CORS restrictions in most browsers — the Same-Origin Policy doesn't block requests from localhost the same way it does from a deployed domain.
In production on Vercel, the client-side fetch to rss.nytimes.com gets blocked because NYT doesn't include Access-Control-Allow-Origin in their response headers.
Fix: move the RSS fetch to a Next.js API route (e.g. /api/rss) so it runs server-side, then have the component fetch from that instead. Server-side requests aren't subject to CORS.
@hpinsley, cool concept! The preview shows just the placeholder though - RSS fetch is hitting CORS since it's client-side:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://rss.nytimes.com/services/xml/rss/nyt/World.xml. (Reason: CORS header 'Access-Control-Allow-Origin' missing).
Moving it to an API route would fix it.
🤖 OpenChaos Bot
Summary: This PR introduces a new "WorldChaos" component that displays a rotating headline from an RSS feed (defaulting to the NYT World feed). It also adds the 'rss-parser' dependency to consume RSS feeds.
Files changed: 4 (package.json, package-lock.json, src/app/page.tsx, src/components/WorldChaos.tsx)
Impact: Medium - Adds a new feature to the homepage, introduces a new dependency, and fetches external data.
I was intrigued to see how you were explicitly going to find news about world chaos, only to find this is literally just the NY Times World News feed. Accurate.
All Activity(31)
Would it be possible to change the style to ASCII so it matches the current theme? It sticks out a lot at the moment
Is "Controll" an intended misspelling (to include "troll" perhaps), or a typo?
@hpinsley It works locally because localhost is exempt from CORS restrictions in most browsers — the Same-Origin Policy doesn't block requests from localhost the same way it does from a deployed domain.
In production on Vercel, the client-side fetch to rss.nytimes.com gets blocked because NYT doesn't include Access-Control-Allow-Origin in their response headers.
Fix: move the RSS fetch to a Next.js API route (e.g. /api/rss) so it runs server-side, then have the component fetch from that instead. Server-side requests aren't subject to CORS.
@hpinsley, cool concept! The preview shows just the placeholder though - RSS fetch is hitting CORS since it's client-side:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://rss.nytimes.com/services/xml/rss/nyt/World.xml. (Reason: CORS header 'Access-Control-Allow-Origin' missing).
Moving it to an API route would fix it.
🤖 OpenChaos Bot
Summary: This PR introduces a new "WorldChaos" component that displays a rotating headline from an RSS feed (defaulting to the NYT World feed). It also adds the 'rss-parser' dependency to consume RSS feeds.
Files changed: 4 (package.json, package-lock.json, src/app/page.tsx, src/components/WorldChaos.tsx)
Impact: Medium - Adds a new feature to the homepage, introduces a new dependency, and fetches external data.
I was intrigued to see how you were explicitly going to find news about world chaos, only to find this is literally just the NY Times World News feed. Accurate.
feat: Add a world chaos headline banner component.
Add a component that polls the world for chaos and display's a one-liner on the page.
https://github.com/user-attachments/assets/eab2c22b-8cb4-4334-b605-8cfc74251bf0