You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please consider exposing adding request headers to the CLI.
I tried to get it working, but I'm hitting a wall:
.option(
'-H, --headers <headers>,
'a request header to pass in to the original URL. Add multiple occurrences for multiple headers. Split value by colon',
processHeaders,
{} // memory
)
... snip...
function processHeaders(headers, memo) {
let [key, val] = headers.split(':');
memo[key] = val;
return memo;
}
to be used like node bin/pa11y.js -H "x-test:1" -H "x-test2:2" http://www.myurl.com
Now it's still possible to do it via the config file, but that is cumbersome if there are runtime variables involved.
The text was updated successfully, but these errors were encountered:
Please consider exposing adding request headers to the CLI.
I tried to get it working, but I'm hitting a wall:
to be used like
node bin/pa11y.js -H "x-test:1" -H "x-test2:2" http://www.myurl.com
Now it's still possible to do it via the config file, but that is cumbersome if there are runtime variables involved.
The text was updated successfully, but these errors were encountered: