How do I bypass Cloudflare Zero Trust auth page when testing web UI with Playwright?

I am building a web app and am currently in the process of adding automated tests, including Playwright. I have my website set up to have the Zero Trust auth page set up with Google auth. When I add my test cases, I can see that all the tests try to test against the access page in the screenshot. I have the following code in my playwright.config.ts filethat passes the ID and secret:
extraHTTPHeaders: {
'CF-Access-Client-Id': process.env.CF_ACCESS_CLIENT_ID,
'CF-Access-Client-Secret': process.env.CF_ACCESS_CLIENT_SECRET
}
extraHTTPHeaders: {
'CF-Access-Client-Id': process.env.CF_ACCESS_CLIENT_ID,
'CF-Access-Client-Secret': process.env.CF_ACCESS_CLIENT_SECRET
}
I see these are being successfully passed to my Playwright instance when I add the --ui flag. I've also added a service token for my web-app per the screenshot here: https://imgur.com/a/54xeb7b Is there anything else I need to do to bypass this page when testing so I can go directly to my home page? Thanks in advance!
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server