Rewrite url with dashes in the wrong way to redirect (error 404)

I use firebase hosting and I set the correct URL rewrites in firebase.json as follows:

"rewrites": [{ "source": "**", "destination": "/index.html" }] 

Everything seems to work fine, as all routes go through index.html, as it should be. However, when I get a firebase object identifier that starts with a โ€œ-" on the route, it throws 404. So, for example, my-cool-app.firebaseapp.com/profiles/-JfZA03uAJI7rpqQg0sG will return 404. However, if I delete the dash in identifier, then the routes seem to be correctly rewritten.

What could be the problem?

+6
source share

Source: https://habr.com/ru/post/981409/


All Articles