-
Notifications
You must be signed in to change notification settings - Fork 166
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
Passthrough does not account for host when checking for handlers #1057
Comments
I would expect that this is more a pretender issue than mirageJS. https://github.com/pretenderjs/pretender A quick search found no issues open/closed that I think match your request. Host typically ends at the first /. I would suspect that you might have to determine this yourself, then adjust the namespace when defining the routes. I have been extracting pretender to allow it to be optionally replaced with MSW https://mswjs.io/. I wonder if that would have the same problem. |
Given a passthrough defined like so:
this.passthrough('/translations/**');
When running on a url like so:
http://localhost:9003/3638/tests/index.html
and the file
translations/en-us.json
Mirage will fail to find the passthrough handler as it considers the "path" to be
3638/tests/translations/en-us.json
instead oftranslations/en-us.json
The text was updated successfully, but these errors were encountered: