Skip to content
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 data urls requests #431

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cdes
Copy link

@cdes cdes commented Apr 23, 2020

This passes through data urls without raising exceptions.

For reference, see this pull request:
miragejs/site#528

@ryanto
Copy link
Contributor

ryanto commented May 19, 2020

Thanks!

Mirage currently ships with a couple default passthroughs, so we should probably add to that list rather than unhandled request.

I'd like the understand which passthroughs safely solve this issue. Does adding this.passthrough('data:**') in your server definition solve this? Or do we need to do an indexOf check on every request?

@cdes
Copy link
Author

cdes commented May 22, 2020

@ryanto: passthrough behavior does not work for some reason. That's why I needed to do what I did.

You can see it here:
https://codesandbox.io/s/mirage-data-urls-b3r3b?file=/src/index.js

@kieranbop
Copy link

I've stumbled accross this, where the passthrough still throws excepts to specific endpoints.

@samselikoff samselikoff mentioned this pull request Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants