Functions index.js not accessible when a [[path]]..js route exists

Hello - I’ve got a /functions folder set up with some sample routes, but I’m finding that when I have an [id].js or [[path]].js file / route-handler that the index.js route is never accessible.

I’ve set up a public repo with a similar setup and a with the issue: [links not allowed but at gitlab] ah017/Cloudflare-functions-test

According to the CF documentation, in my sample repo the more specific route of /api/music should appear before /api/music/[id] and /api/music/[[path]].

The [id] and [[path]] are working as expected and it’s just the index route that’s not triggering. Does anyone know where I’m going wrong please?

Now with screenshots!


This is a known issue and we have a ticket tracking it internally. For now, I’d recommend just using the [[path]].js

Would it be worth updating the docs with this until a fix is in place?

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