frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Developers don't understand CORS (2019)

https://fosterelli.co/developers-dont-understand-cors
20•toilet•1h ago

Comments

piyh•41m ago
The only thing I remember about CORS is that it takes way longer than expected to debug, by design the error messages sent to the browser are intentionally gutted, and CORS error scenarios are hard to tell from other failure modes atfirst glance.
deathanatos•33m ago
> by design the error messages sent to the browser are intentionally gutted

A CORS error is not "an error message sent to the browser", it is an error generated by the browser, because the browser has decided it cannot permit the request. (Though certainly a server can not understand a CORS request as such, and returned a weird response, which would then end up getting translated to a CORS failure.)

deathanatos•31m ago
Generally when I'm debugging these, I need/want to know what was the preflight (if applicable), and was the preflight what was expected? When I help others debug these, generally I find there is little expectation of what the preflight "should" be, and instead just a bunch of stochastic attempts to adjust the server's response headers to get the browser to capitulate — regardless of whether that makes any sense at all.

I would also say I think Firefox's network inspector is better in this area. (But I'm often having to ask others to "no, don't send the failing request, send the CORS preflight", we need to understand what happened with it.)

> Anecdotally, lots of developers I’ve talked with don’t understand well how CORS works.

Yeah, most FE devs I've worked with seem to not understand CORS.

> Is the CORS API too complex and confusing

I think it can be hard if you don't understand why the exceptions to preflights are what they are, but the moment you internalize "because the browser can already emit that request in other cases" then it becomes obvious what categories are what & why.

jdw64•19m ago
Sometimes I'm not even sure what I truly 'understand.' When even senior engineers working on products used by hundreds of millions of people, like Zoom, have had these kinds of issues, it makes me wonder. So I usually just write code the way it was left by my seniors, out of inertia. But I realize that the area I work in is actually incredibly abstracted.
mock-possum•9m ago
I honestly just can’t be arsed. I write the code to do the thing I want, and if CORS throws a wrench into things, I make Claude fix it for me. I’m tired boss.
encomiast•4m ago
It's not just CORS that's hard to understand. Many (most?) developers don't really understand the threat model. And even when it's explained it hard to see why it's a big deal. The article does a nice job giving a concrete example.

Renting a sewing machine from the library

https://www.bbc.com/future/article/20260618-the-weird-and-wonderful-libraries-of-finland
128•sohkamyung•4h ago•57 comments

Epoll vs. io_uring in Linux

https://sibexi.co/posts/epoll-vs-io_uring/
67•Sibexico•4h ago•21 comments

Show HN: TownSquare, a tiny presence layer for websites

https://townsquare.cauenapier.com/
92•cauenapier•15h ago•33 comments

Developers don't understand CORS (2019)

https://fosterelli.co/developers-dont-understand-cors
22•toilet•1h ago•6 comments

Loupe – A iOS app that raises awareness about what native apps can see

https://github.com/mysk-research/loupe
97•Cider9986•15h ago•21 comments

Slow breathing modulates brain function and risk behavior

https://www.cell.com/neuron/fulltext/S0896-6273(26)00339-9
76•croes•4h ago•14 comments

15-minute at-home Lyme disease tick test

https://www.bostonglobe.com/2026/06/17/business/lyme-disease-tick-test/
54•bookofjoe•2d ago•16 comments

Project Fetch: Phase Two

https://www.anthropic.com/research/project-fetch-phase-two
39•stopachka•3h ago•13 comments

When I reject AI code even if it works

https://vinibrasil.com/when-i-reject-ai-code-even-if-it-works/
56•vnbrs•2h ago•25 comments

SMPTE Makes Its Standards Freely Accessible

https://www.smpte.org/blog/smpte-makes-its-standards-freely-accessible-openingstandards-library-t...
238•zdw•10h ago•65 comments

UHF X11: X11 Built for VisionOS and Apple Vision Pro

https://www.lispm.net/apps/uhf-x11/
176•zdw•10h ago•31 comments

Unauthorized alert sent to cell phones across Brazil

https://www.cnn.com/2026/06/20/americas/brazil-hackers-unauthorized-alert-latam
96•zdw•7h ago•75 comments

DOS Game "F-15 Strike Eagle II" reversing project needs DOS test pilots

https://neuviemeporte.github.io/f15-se2/2026/06/20/needyou.html
216•LowLevelMahn•12h ago•59 comments

Whole cross-sectional human ultrasound tomography

https://www.nature.com/articles/s41551-026-01660-4
35•lnyan•2d ago•4 comments

Alice is impatient

https://brooker.co.za/blog/2026/06/19/waiting.html
63•birdculture•6h ago•17 comments

Semiconductor Lifeline Keeps Fighter Jets in the Air

https://spectrum.ieee.org/phoenix-semiconductors-legacychips-oems
45•rbanffy•4d ago•13 comments

NOLA 'Nacular: One man's crusade to preserve New Orleans's vernacular signage

https://countryroadsmagazine.com/art-and-culture/people-places/nola-nacular/
22•NaOH•4d ago•2 comments

PostgresBench: A Reproducible Benchmark for Postgres Services

https://clickhouse.com/blog/postgresbench
85•saisrirampur•8h ago•22 comments

Linux eliminates the strncpy API after six years of work, 360 patches

https://www.phoronix.com/news/Linux-7.2-Drops-strncpy
111•simonpure•6h ago•86 comments

Show HN: Make PDFs look scanned (CLI or in the browser via WASM)

https://github.com/overflowy/make-look-scanned
96•overflowy•9h ago•48 comments

Inference cost at scale with napkin math

https://injuly.in/blog/napkin-inference-cost/index.html
64•gmays•4d ago•14 comments

Show HN: StartupWiki – A Free Alternative to Crunchbase

https://startupwiki.tech/
167•shpran•11h ago•55 comments

Temporary Cloudflare accounts for AI agents

https://blog.cloudflare.com/temporary-accounts/
180•farhadhf•16h ago•98 comments

The Wholesale Plagiarism of Obscure Sorrows

https://waxy.org/2026/06/the-wholesale-plagiarism-of-obscure-sorrows/
330•ridesisapis•9h ago•139 comments

The rise of South Korea’s weapons business

https://www.politico.com/news/magazine/2026/06/20/south-korea-weapons-dealer-trump-00959559
120•JumpCrisscross•15h ago•44 comments

Bun has an open PR adding shared-memory threads to JavaScriptCore

https://github.com/oven-sh/WebKit/pull/249
117•gr4vityWall•10h ago•226 comments

Supermarket giant Tesco sues VMware for breach of contract (2025)

https://www.theregister.com/software/2025/09/03/supermarket-giant-tesco-sues-vmware-for-breach-of...
103•wglb•6h ago•26 comments

White House delays US voting-machine vulnerability report

https://www.reuters.com/world/white-house-delays-release-us-voting-machine-study-midterms-near-20...
55•logickkk1•1h ago•38 comments

Pre-2022 Books

https://notes.lorenzogravina.com/musings/pre-2022-books
162•trms•4h ago•101 comments

'We had to get out of the way': The backlash over delivery robots

https://www.bbc.com/news/articles/c0rygp005wjo
47•higginsniggins•3h ago•44 comments