Skip to main content

Command Palette

Search for a command to run...

Mastering Playwright: Ignoring CORS Limitations for Efficient Automation

Streamline Your Testing Workflow: How to Ignore CORS in Playwright

Updated
1 min read
Mastering Playwright: Ignoring CORS Limitations for Efficient Automation

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
        },
      },
    }