Mastering Playwright: Ignoring CORS Limitations for Efficient Automation

JagsJags
1 min read

Add the following options to your Playwright Config to disable CORS depending on your usecase.

 {
      use: {
        bypassCSP: true, // add this to disable cors
        launchOptions: {
          args: ['--disable-web-security'], // add this to disable cors
        },
      },
    }
0
Subscribe to my newsletter

Read articles from Jags directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Jags
Jags

I am Senior Test Automation Engineer, who is interested in Open Source & Quality at scale.