Introduction to CORS for go programmers
https://eli.thegreenplace.net/2023/introduction-to-cors-for-go-programmers/
Eli with a thorough and excellent introduction to CORS. Even if you're not a go programmer, I think you'll get a more thorough understanding of CORS from reading this.
He also links to his series on developing a REST server in go, which I hadn't previously seen, and is sure to be similarly excellent. I'm pretty OK at writing middleware in go, but I often feel like I'm just chucking code around until it seems to work, and I"m sure that reading his article would give me a much better understanding of what I'm actually doing.
(I suppose I'll read it when/if I go back to writing go code for a living... as it is I'll go back to chucking javascript code around until it seems to work)