This is... very confusing behaviour imo. cc @GregBrimble @Sunil Pai
This is... very confusing behaviour imo. cc @GregBrimble @Sunil Pai
assets_navigation_has_no_effect to your compatibility_flags

fetch to a URL vs hitting it in their browser.return new Response(null, { status: 404 });assets_navigation_prefers_asset_serving behaviourassets_navigation_has_no_effect flag if you wish to opt out. For most people though, we expect this change to be a welcome one. In traditional SPA setups, this will reduce the number of billable requests that you see in your application, without affecting functionality.fetch took me some time to figure out and I follow the platform very closely - without something like debug logs from wrangler, I can imgine people are going to hit this very frequently./api/foo vs when they fetch it, especially when there's no code in the worker that explicitly handles this. As standard and completely transparent behaviour, that's just weird.wrangler dev.GET /api/foo - Received Sec-Fetch-Mode: navigate, serving <> or words to that effect, it'd help a lot with the confusion.assets.not_found_handling is something other than “none”, that fallback is served (index.html for SPA, 404.html for 404-page).env.ASSETS.fetch(request) will likely no longer be necessary in most applications. They can now just return 404s or whatever.env.ASSETS.fetch(request), a response according to assets.not_found_handling is returned.404.html traverses up to find one, but index.html doesn't in SPA mode, which might explain your weirdness @Silvan: https://github.com/cloudflare/workers-sdk/blob/d4c11710fd36286be8587379d659e19e91778777/packages/workers-shared/asset-worker/src/handler.ts#L867wrangler dev and getting that error?assets_navigation_has_no_effectassets_navigation_has_no_effectYou can configure and override this default routing behaviour. For example, if you have a Single Page Application and want to serve index.html for all unmatched routes, you can set not_found_handling = "single-page-application":app.use('*',...)return new Response(null, { status: 404 });assets_navigation_prefers_asset_serving/api/fooGET /api/foo - Received Sec-Fetch-Mode: navigate, serving <>assets.not_found_handlingassets.not_found_handlingenv.ASSETS.fetch(request)env.ASSETS.fetch(request)404.html