Hello, I need some help with Cloud Flare authentication. I implemented a test where I run two Cypress test runners at the same time based on @gray-kilobyte-89541 's blog post using socket.io. It works well locally when I connect through VPN from my laptop to the server. However, when I am trying to put this into our CI pipeline, I am running into the problem where I get the following message: "[187:0713/174146.255608:ERROR:cert_verify_proc_builtin.cc(681)] CertVerifyProcBuiltin for .cloudflareaccess.com failed:
----- Certificate i=0 (OU=Cypress Proxy Server Certificate,O=Cypress Proxy CA,L=Internet,ST=Internet,C=Internet,CN=.cloudflareaccess.com) -----
ERROR: No matching issuer found
I need to bypass the Cloud Flare authentication, which I am trying to do by having a beforeEach hook in each test file and where I am doing this:
beforeEach(() => {
cy.intercept(${Cypress.config('baseUrl')}**, req => {
req.headers['CF-Access-Client-ID'] = '***'
req.headers['CF-Access-Client-Secret'] = Cypress.env('CF_SECRET')
})
})
And I am setting Cypress.env for CF_SECRET in the run.js file where I run both Cypress test runners like this:
return cypressAction({
configFile: process.argv[3],
env: {
CF_SECRET: process.argv[4]
},
and I pass the CF_SECRET from the .yaml file that runs in Github.
I am not sure why it's not bypassing the CloudFlare certification, any help or ideas would be greatly appreciated! It looks like the headers are not getting set?