#False alarm

20 messages ยท Page 1 of 1 (latest)

untold sail
#

Cloudflare does not add or remove CORS headers to Workers

real kite
#

I add them, it was working yesterday

untold sail
#

Do you see the CORS headers on your response?

real kite
#

That hasn't been changed and was working yesterday

untold sail
#

Look at the response, do you see the CORS headers?

real kite
#

PM

untold sail
#

Cloudflare Eng don't work weekends and definitely don't release on weekends. We also don't mess with responses

#

Best path is to debug and find the actual problem rather than point at a platform issue off the bat

real kite
#

Hehe, might be that I'm throwing accusations since the experience last time where I was debugging for hours until contacting you so I'm a bit sour from that. Apologies if this is not on you, but I really haven't changed anything with the cors and like I said it was working yesterday so I have no idea.

I also noticed that you recently released a new version of itty-router-openapi that you renamed Chanfana https://github.com/cloudflare/chanfana

So I implemented a new worker yesterday with that pattern and it worked. Tested it in the chrome console using fetch() and got a response. Today when I test it it's not working.

GitHub

OpenAPI 3 and 3.1 schema generator and validator for Hono, itty-router and more! - cloudflare/chanfana

#

I will debug this until I find the problem and if it turns out to be on me, all I can do is humbly apologize.

#

Here's the implementation using Chanfana

#

๐Ÿ˜…

#

NM

#

Sorry

untold sail
#

Trust me, if CORS broke for everyone we'd be in a big incident already haha

Many things that can explain what happened - it worked, was cached and then the code broke. You just forgot you did a change after the test, etc.

real kite
#

Must be it. I humbly apologize ๐Ÿ™‡โ€โ™‚๏ธ

untold sail
#

Haha no worries

real kite
#

Ok just for completion. I implemented a new worker and copied the wrangler.toml from my other endpoint, so it had the same name configuration and overwrote the old one and on top of that I applied the cors to the wrong endpoint as you can see in the screenshot. Had been working 18 hours yesterday so wasn't thinking clearly. Cloudflare is great ๐Ÿ˜