Closed heardy closed 5 years ago
@heardy I've had a look at this and I think that ASR is working as expected. If you are using webpack dev server, maybe something to do with how it is handling dots in urls?
That looks like a message from your server, not something to do with ASR – I would guess that your server has some rule that says "for any route, server up this same index.html file", but that rule doesn't cover routes with periods?
Thanks guys. It was an issue with the server not ASR.
For anyone interested, the issue was with webpack-dev-server
. I needed to use disableDotRule: true
setting in the historyApiFallback
option.
In webpack.config.js
(see https://webpack.js.org/configuration/dev-server/#devserverhistoryapifallback)
devServer: {
historyApiFallback: {
disableDotRule: true
}
}
When adding a state that includes a named parameter eg
/user/:userId
, if the named parameter portion of the url includes a dot (eg. /user/123.345) you get the errorCannot GET <path>
(see screenshot)Route code
Result