Puppeteer `page.authenticate` messes up CSRF tokens in forms.
This commit is contained in:
parent
05ec1be101
commit
6cab53abd4
|
@ -55,9 +55,8 @@ const path = require('path');
|
|||
|
||||
if (process.env.AUTH_USER && process.env.AUTH_PASSWORD) {
|
||||
await exec("basic authentication", () => {
|
||||
return page.authenticate({
|
||||
username: process.env.AUTH_USER,
|
||||
password: process.env.AUTH_PASSWORD
|
||||
return page.setExtraHTTPHeaders({
|
||||
'Authorization': `Basic ${new Buffer(`${process.env.AUTH_USER}:${process.env.AUTH_PASSWORD}`).toString('base64')}`
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue