Re:htmx Web Security Basics
by bitexploder on Sunday September 08, 2024 @03:20PM
(#41482470)
Yeah, browser security on the whole is surprisingly complicated. SameSite cookies, CORS, CORS Preflight, the in the weeds behaviors of many things are just invisible or not intuitive until you are deep into them.
I dislike this about CORS, especially when you'd want to configure it at the web server/ingress level, but suddenly need dynamic logic to return the appropriate header, for example here's an older example I used when fronting some apps with Apache: https://stackoverflow.com/a/22331450
I understand why it's in place (because you probably shouldn't leak all of the allowed domains), but dealing with that can be a bit awkward.