-
I'm currently trying to access an instance of Storybook that is secured with basic authentication headers. I have followed the instructions listed at https://docs.percy.io/docs/capturing-assets-protected-with-authentication-cli, but am still getting a Here is the verbose output of my first attempt:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hey @benedfit! You would think that would work, but internally those However looking at how the network is implemented, you can probably use the # .percy.yml
version: 2
snapshot:
percy-css: ...
discovery:
request-headers:
# replace <...> with a base64 encoded "username:password"
Authorization: "Basic <...>" If you don't want to check in a base64 string, you can generate it within a JavaScript config file // .percy.js
module.exports = {
version: 2,
snapshot: {
percyCSS: "..."
},
discovery: {
requestHeaders: {
// replace "username:password" with the real username and password
Authorization: `Basic ${Buffer.from('username:password').toString('base64')}`
}
}
} |
Beta Was this translation helpful? Give feedback.
-
Hey @benedfit! I just released v4.1.0 which should supply discovery request headers as expected. It should automatically transform |
Beta Was this translation helpful? Give feedback.
Hey @benedfit!
I just released v4.1.0 which should supply discovery request headers as expected. It should automatically transform
authorization
credentials into a basic-auth header as well, so you can continue to use that option.