Cloudflare assets_navigation_prefers_asset_serving breaking oauth redirect
Hello Everyone. Cloudflare recently changed how some of the navigation things work for SPAs and now a default better-auth oauth setup dosent work anymore.
The issue here is that after i click on an account on google, i get redirected to
http://localhost:5173/api/auth/callback/google?state=..
but this is now seen as a "client side navigation" and just serves my html file instead of going to the server.
I dont have any non default setting on my client or server
All i know is that if the browser navigates to the same url with the Sec-Fetch-Mode: navigate
header it will just reach to the CDN with the asset instead of making a trip to the server
any ideas on how to fix this?
https://developers.cloudflare.com/workers/configuration/compatibility-flags/#flags-historyCloudflare Docs
Compatibility flags · Cloudflare Workers docs
Opt into a specific features of the Workers runtime for your Workers project.

0 Replies