react-firebase-starter icon indicating copy to clipboard operation
react-firebase-starter copied to clipboard

Routes with dots cause 404

Open gordon-to opened this issue 8 years ago • 1 comments

An example route

{
    "path": "/task/:id",
    "page": "./task",
    "chunk": "main",
    "data": {
      "task": "GET http://example.com/api/task/id"
    }
 },

Will take a url /task/1234 and make a request to http://example.com/api/task/1234 But an id with . in it eg /task/123.3 results in a 404 error

gordon-to avatar Feb 14 '17 19:02 gordon-to

Can you try doing (nothing needed to be installed)

"path": "/task/:id(.*)",

I had a similar issue with trying to add / to the pathname in my react-starter-kit project (both use universal-router). Now I can put / . < > * all in my route

Here is a link to my pull request documenting it https://github.com/kriasoft/universal-router/pull/112

DaveyEdwards avatar Sep 07 '17 17:09 DaveyEdwards