CORS fail after setExtraHTTPHeaders
See original GitHub issueCORS fail after setExtraHTTPHeaders if you disable OOR-CORS(out-of-blink-cors) using below code, same code works puppeteer.launch({headless:false, launch: {args:[“–flag-switches-begin”, “–disable-features=OutOfBlinkCors”, “–flag-switches-end”]}});
any ideas?
Steps to reproduce
Tell us about your environment:
- Puppeteer version: 1.19.0
- Platform / OS version: Windows 10
- URLs (if applicable):
- Node.js version: v12.9.1
What steps will reproduce the problem?
/* node --experimental-repl-await */
const puppeteer = require('puppeteer')
const browser = await puppeteer.launch({headless:false})
const page = await browser.newPage()
await page.setExtraHTTPHeaders({'test':'aa'})
await page.goto('https://youtube.com')
/* F12 developer mode */
What is the expected result? CORS success regardless setExtraHTTPHeaders
What happens instead? CORS fail
Issue Analytics
- State:
- Created 4 years ago
- Reactions:10
- Comments:10
Top Results From Across the Web
CORS fail after setExtraHTTPHeaders · Issue #4889 - GitHub
CORS fail after setExtraHTTPHeaders if you disable OOR-CORS(out-of-blink-cors) using below code, same code works
Read more >When set custom header , why the script tag request throw ...
I think you are adding the script tag programmatically somewhere you can do something like, await page.
Read more >3 Ways to Fix the CORS Error — and How the Access-Control ...
Fix one: install the Allow-Control-Allow-Origin plugin. The quickest fix you can make is to install the moesif CORS extension .
Read more >Network domain - Chrome DevTools Protocol - GitHub Pages
The status code of the response. This is useful in cases the request failed and no responseReceived event is triggered, which is the...
Read more >CORS errors - HTTP - MDN Web Docs - Mozilla
If the CORS configuration isn't setup correctly, the browser console will present an error like "Cross-Origin Request Blocked: The Same Origin ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ran into the issue on 5.4.1 again and the
'--disable-features=OutOfBlinkCors'
workaround no longer mitigates the issue.We are closing this issue. If the issue still persists in the latest version of Puppeteer, please reopen the issue and update the description. We will try our best to accomodate it!