xolvio / meteor-http-interceptor

Intercepts HTTP calls and allows fake implementations to take over entire domains. Used for testing.
13 stars 5 forks source link

Interceptor cannot ignore certain URLs #4

Closed fongandrew closed 9 years ago

fongandrew commented 9 years ago

Ignore functionality does not appear to be documented, but noticed it when poking through the source. Currently, the following code doesn't do anything.

var HttpInterceptor = Package['xolvio:http-interceptor'].HttpInterceptor;
HttpInterceptor.ignore(new RegExp("http://localhost:9200"));

I think the issue is at https://github.com/xolvio/meteor-http-interceptor/blob/master/server.js#L138-L140. Specifically, !_shouldRecord should be !_shouldRecord(url)

samhatoum commented 9 years ago

Good spot, thanks!