-
Notifications
You must be signed in to change notification settings - Fork 439
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 is not working at all #404
Comments
Still having issues with this, could really use an eye, it's blocking my project pretty bad |
Hm, try dropping the query param part of the URL string? |
So just like |
Is there any way you can reproduce this in a barebones ember app? |
I can attempt to do that |
I'm having the same issue. I can see the request go through, but the callback never fires. |
I'm still investigating. If you want a sample app, you clone my repo and checkout the branch
The request is fired from |
This sounds like a bug some were encountering while using passthrough with jquery < 2, what version of jquery are you on @ming-codes? (Unfortunately, passthrough currently only works with jquery >= 2.x. There is a pretender issue for this). |
Yup, upgrade to jQuery 2.x. Everything is fine now. |
I had jQuery 2.x installed and it wasn't working for me. I've switch over to the live API since then but I hope I won't have the same problems on similar projects in the future. |
@joeegan try using the double wildcard this.passthrough('http://ps1.pubnub.com/**');
this.passthrough('http://ps2.pubnub.com/**');
... |
passthrough doesn't work for me at all. |
I've tried a few different ways to pass though, it seems like I can't get any of them to work with ember-cli-blanket's POST to write-blanket-coverage
|
actually, my problem might be with blanket |
** wildcard worked for me! this.passthrough('http://a.tiles.mapbox.com/**'); |
Closing due to inactivity. |
I have mixed results with passthrough. export default function() {
this.namespace = 'api';
...
// remote URLs seems to get through just fine
this.passthrough('http://www.juicer.io/**');
this.passthrough('http://assets.juicer.io/**');
// but local URL keeps getting blocked
this.passthrough('/meta');
} This // app/services/common.js
export default Ember.Service.extend({
ajax: Ember.inject.service(),
...
getMeta(routeName) {
return this._getJSON(`meta/${routeName}.json`);
},
...
_getJSON(url) {
return this.get('ajax').request(url, {
host: '/',
contentType: 'application/json; charset=utf-8'
}).catch((error) => {
throw error;
});
}
}); |
@rizkysyazuli |
@jrdn91 ِWere you able to resolve this issue, I have tried,
None of them seem to work. I am encountering this, when I am using miragejs in expo snack for react native development. |
If you are using react native, you might be better posting a message here. https://github.com/miragejs/miragejs/issues Most of the functionality of this addon has been abstracted to mirageJS there, including the pretender code. This addon is only left with the functionality of making it work more seamlessly with ember. |
I'm attempting to connect to pubnub in my app and when pubnub attempts to make a connection it always connects at a different url that looks something like this
http://ps5.pubnub.com/...
But that subdomain part before
pubnub.com
is always a different number.I'm not sure how I can easily account for this url in a passthrough that has a variable part, but for the time being I've never seen the number go over 20, so I made 20 instances of a passthrough that captures the entire url that looks like this
But it still isn't working, each time I refresh and it hits a different number, I still get the error in the console that mirage says there was not a url found, but when I copy the url it's claiming it's trying to hit and search in the config file for it I find the exact url defined in one of the passthroughs, but it's not passing through to the pubnub server.
I'm using
"ember-cli-mirage": "0.1.11"
,"pretender": "~0.10.1"
, and"jquery": "^2.1.4"
The text was updated successfully, but these errors were encountered: