Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Option for http authentication #419

@pdaether

Description

@pdaether

I'm using minimalcss on a staging system which is protected with a basic http authentication.
At the moment this only works with minimalcss when giving the credentials as part of the URL wich is not perfect, because then you have the password in different logs.
It would be nice if it would be possible to give username and password as part of the options so that minimalcss can set the credentials on the puppeteer page object.

I know that I can pass a puppeteer browser instance, but the the credentials need to be given to the page object, so I guess best place would be somewhere in src/run.js

const page = await browser.newPage();
await page.authenticate({'username':options.auth.username, 'password': options.auth.password});

If you agree on a general approach, I'm also happy to provide a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions