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

Missing Request headers for requests pass through via fakeServer #49

Closed
revathskumar opened this issue May 9, 2018 · 2 comments
Closed
Labels

Comments

@revathskumar
Copy link

The headers like Cookie are missing for the requests which pass though the fakeServer and filter.
This is causing the requests to lose the sessions.

const server = sinon.fakeServer.create({ logger: console.log, unsafeHeadersEnabled: true });
server.autoRespond = true;
server.xhr.filters = [];
server.xhr.useFilters = true;

//If the filter returns true, the request will not be faked - leave original
server.xhr.addFilter(function(method, url, async, username, password) {
  // have some condition to allow some requests to pass through
});

server.respondWith((xhr, id) => {
  xhr.respond(200, { "Content-Type": "application/text" },"Hello World");
});
@mroderick
Copy link
Member

It seems you have studied this issue thoroughly. Do you have a proposal for how this could be addressed?

@stale
Copy link

stale bot commented Jul 8, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants