Using Percy with a website with .htaccess authorization #1906
|
I want to make snapshots for a website that is protected by .htaccess. I tried to add the credentials to percy.yml file, but did not succeed. I found this page: But having: snapshot: in my percy.yml gives me an error: This is the client log id of the percy client: How can I access snapshots on protected pages? |
Replies: 1 comment 1 reply
|
Can you try passing the credentials when making the HTTP request to load the page but through the URL format itself. Specifically, the syntax is: https://username:password@yourdomain.com/path You can pass any request headers as a snapshot option. For example, (Cypress SDK) using basic auth: cy.percySnapshot('Home page', { If the issue is not resolved please create a ticket using https://www.browserstack.com/contact#technical-support |
Can you try passing the credentials when making the HTTP request to load the page but through the URL format itself.
Specifically, the syntax is:
https://username:password@yourdomain.com/path
You can pass any request headers as a snapshot option. For example, (Cypress SDK) using basic auth:
cy.percySnapshot('Home page', {
requestHeaders: {
Authorization: 'Basic xxx'
}
});
If the issue is not resolved please create a ticket using https://www.browserstack.com/contact#technical-support