~/talk

How About a Tour of CORS?

TalkinFrenchat Devoxx France 2022 · 2022-04-20..04-22· [web-platform, security]
links:none on file
slides:none on file

A practical walkthrough of Cross-Origin Resource Sharing using an Express app and cors middleware: a single-page app fetches a cheeses API and also requests an avatar with credentials, demonstrating how CORS errors occur and how to fix them. It explains that browsers enforce CORS, that preflight requests use OPTIONS and must echo allowed methods and headers, that using a wildcard Origin fails when credentials are sent, and recommends setting the Vary: Origin header; demos and checks use fetch, browser DevTools, and curl.

AI-written summary · about

  1. 0:00Start
  2. 3:38same-origin policy
  3. 16:03Access-Control-Allow-Origin
  4. 25:36How It Works
  5. 26:53Request Headers
  6. 27:33Response Headers
  7. 33:08Debugging
  8. 38:17Related Topics
  9. 40:19References
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.