-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I custom root_url to normalize_url normally? #33
Comments
Do you have an example website that show the problem? I forget that you can read directories without slash at the end (I think that I have something like this on my other website). |
The solution is to use |
That maybe works, but let path_name = normalize_url(decodeURIComponent(url.pathname)); |
normalize_url path should get path to the route that should start with slash. This function is to remove the path to service worker from the URL request. If you have path I don't think it make sense to use relative path in route. I need to check to be sure that the trailing slash is there. The version was not yet released to NPM. |
I think I did a mistake, I tested with wrong demo. |
|
I fixed the code, now it should work the same as before. Again, can you show me an example where the library gives problems? |
Sorry for late reply. I can describe the scenario I encountered in detail. My website carries the prefix |
If you have service worker I can check what I can do to allow routing To change this behavior (I don't want to have a breaking change) I would need to introduce So if you use |
Sorry, I don't understand clearly. If I register a service worker like this: navigator.serviceWorker.register("/s/sw.js", { scope: '/' }) Should I only request from |
Yes exactly if you have You can't provide |
ok, thx, I will recheck my situation. |
With the following line:
my root_url could be '/s', which lead to a failed route match for my request starts with '/s', but I know my root url should be '/', how can I fix this problem?
The text was updated successfully, but these errors were encountered: