72
CORS: What is it protecting? (sanyamserver.online)
all 10 comments
sorted by: hot top new old
[-] ryokimball@infosec.pub 30 points 1 month ago* (last edited 1 month ago)

Absolutely NOTHING! Good God, y'all.

[-] adhdsergio@lemmy.world 12 points 1 month ago

When I first learned about CORS, I had trouble understanding it because I couldn't figure out how this protected the server and I couldn't understand why you would do this just for the client ๐Ÿ˜„

[-] cout970@programming.dev 9 points 1 month ago

One thing to note, CORS only makes sense if your API uses cookies for authentication, most APIs use custom headers, the Authentication header, or even url tokens, they don't rely on cookies, so most of the time, APIs don't care about CORS. People keep blindly repeating that accepting all origins "*", is bad for security, but the situations where this is relevant are really uncommon.

[-] bitfucker@programming.dev 1 points 1 month ago

I wonder if XSS, CSRF and other client side attacks are still common

[-] Swedneck@discuss.tchncs.de 1 points 1 month ago

protecting me from using my fucking browser, most of the time

this post was submitted on 28 Jun 2026
72 points (97.4% liked)

Programming

28138 readers
356 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS