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

fix(adapter-puppeteer): Do not intercept CORS preflight requests #90

Merged
merged 2 commits into from
Aug 11, 2018

Conversation

offirgolan
Copy link
Collaborator

Resolves #87.

@jasonmit jasonmit self-requested a review August 10, 2018 04:55
@jasonmit
Copy link
Contributor

CORs test is failing in CI

try {
responseBody = await response.text();
} catch (error) {
/*
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer needed since im resolving the promise on requestfinished instead of on response. That's where it should have been resolving in the first place.

@@ -1,10 +1,11 @@
import Adapter from '@pollyjs/adapter';
import { URL } from '@pollyjs/utils';
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using url-parse instead of node's URL as it is a consistent API across node versions and the browser.

@jasonmit jasonmit merged commit 53ad433 into master Aug 11, 2018
@jasonmit jasonmit deleted the cors-preflight-fix branch August 11, 2018 05:38
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.

2 participants