Pages redirect existing URL to home page

I’m using cloudflare pages to host my svelte app. I wanted to add a .well-known/assetlinks.json file (used by android apps, path can’t be changed). When I try it locally, it works but when I pushed the changes and opened the commit URL (so cache shouldn’t apply. Tried anonymous window, disabling cache in dev tools and using curl directly), it would just show the home page instead of the JSON file.

Pages cannot serve files in a .well-known folder.

You could put a worker in front of Pages to serve the file.

I mean my project probably won’t get past the free worker limit, but I don’t like that I have to create a worker just to serve a single file.

Is there a way without creating a worker? Why does cloudflare not serve the .well-known folder?

It’s a bug, and is being worked on. For now, a worker is a workaround.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.