Worker doesn't work remotely as it should

Hi guys, I have this issue. When testing worker locally via wrangler, everything works just fine, but when switching to remote, it doesn't work like on local. I have one endpoint, where I'm running two fetch requests. One does POST to login, grabs cookies and then fires another request with these cookies. Locally second request returns correct data, remotely, I'm losing authorization, maybe it doesn't send cookie. So it returns html, as if I didn't send the cookie. Same thing happens on deployed worker as well. What can be the issue? It drives me nuts, been trying to make it work for like 2 days
4 Replies
Erisa
Erisa7mo ago
remotely, I'm losing authorization, maybe it doesn't send cookie. So it returns html, as if I didn't send the cookie.
Is that html text from your Worker or generated by Cloudflare? I dimly recall an issue with remote dev and POST requests causing stray Cloudflare 400/403 errors, but it's been a while since I've seen it
aquarazorda
aquarazorda7mo ago
@Erisa | Support Engineer it's the html response from the server, which I'm sending request to. I would've gotten same html, if I've sent same request without cookies or invalid cookies from local.
Erisa
Erisa7mo ago
I see
aquarazorda
aquarazorda7mo ago
So it's not like something is blocking me Seems like Netlify was the answer