-
Notifications
You must be signed in to change notification settings - Fork 689
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 to exclude certain path in page.js? #566
Comments
Hi satyakresna, I am looking for the same behaviour. In my case, I would like to serve uploaded files without page.js catching the attempts. In my app, users sometimes create links to point to certain file uploads, let say One approach, yet unsufficient, is to require users to specify Instead, I would like to place a dedicated route for uploads. If users attempt to navigate to a path
How to do this? What to write in the ´/uploads/*` handler function? |
After trying out different approaches, the only one that works was hinted in #317 and adapted to my case as below:
The problem seems to be that before the execution reaches the route handled, the page.js internals have already called pushState and set other stuff. Therefore the browser thinks we are already at To break the history chain, Page.js must somehow tell the browser that the next url will not be handled by page.js. I guess |
Hi, is there any method to ignore certain path in page.js? Example, I have
/api/*
path that load list of API in my project and I want this path should not execute by page.js. I'm looking in documentation there's no mention about how to do that. Cc @matthewp.The text was updated successfully, but these errors were encountered: