Consider the following URL:
http://localhost:8080/request/resources.0.methods.0
I would expect to run the main file (index.html in this case) and the client is handling the path on its own. However, I'm receiving an error:
ENOENT: no such file or directory, stat '/home/jarrod/workspace/advanced-rest-client/api-console-app/request/resources.0.methods.0'
It would work if I'd replace all dots with dashes - for example. I'm guessing that the polyserve thinks it is a file (because of the .0?) and is trying to serve the file. Because there's no such file I'm receiving an error.
After I upload the app to the Firebase static hosting it works perfectly but the development process is hard because I have to remove the path each time I'm refreshing the page. Also testing deep links is impossible in dev environment.
I'm actually using polymer-cli but since it uses polyserve I'm reporting it here.
Same problem here
I can reproduce, but we need to think about how we fix this. When there is an extension in the path, we assume you're trying to load that specific file and not visit an application route.
Fixing this will most likely require asking the user for a directory where they are serving assets from and then only responding with 404 Not Found for requests made to that directory. I'm not sure what the best way to do that is.
I've got the same problem and a database of appr. 62.000 files, many of which have a dot in them or in the pathname. Is there any progress on this yet?
I think w maybe e could give a regex option to determine what files are valid routes, which defaults to ^[^.]*$, but could be narrowed to specific file extensions like ^(?!\.html)*$, etc.
@FredKSchott @justinfagnani Is there any progress on this? We are currently trying to include version numbers as part of the route (/something/v1.0.0) and this seems impossible. Is there a workaround for this limitation or can it be bypassed somehow with polymer serve? Thank you.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
@FredKSchott @justinfagnani Is there any progress on this? We are currently trying to include version numbers as part of the route (
/something/v1.0.0) and this seems impossible. Is there a workaround for this limitation or can it be bypassed somehow with polymer serve? Thank you.