blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not
Unanswered
Gharial posted this in #help-forum
GharialOP
Having trouble with cors in nextjs 13.4 blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status. Anyone know fo a work around'
7 Replies
@Gharial Did you figure this out? I'm having the same issue
GharialOP
Hello @.wilbsy
Been a while so remind me of the specific issue
Hi, and thanks for responding!
fetch preflight fails and then throws a CORS error when actual client side fetch happensGharialOP
@.wilbsy go ahead and throw me the offending code to see if I can spot something
GharialOP
@.wilbsy I assume you are using nextjs 13.4?
Turns out the endpoint was missing an
AllowedHeaders: []string{"*"} which was the issue. But yes, we're running 13.4. Anyhow, thanks for your willingness to help!