wjdp / htmltest

:white_check_mark: Test generated HTML for problems
MIT License
325 stars 54 forks source link

Add an option to allow self-signed certificate (InsecureSkipVerify ) #112

Open jgazeau opened 5 years ago

jgazeau commented 5 years ago

Hi guys,

We had a lot of error using htmltest with a "x509: certificate signed by unknown authority". I tought it would be nice to add an option to skip the check on self-signed certificates as in lot of companies we are using these and it is not relevant to get errors like that. Using TLSClientConfig: &tls.Config{InsecureSkipVerify : true}, would do the job. I'll made a pull request with an option like "IgnoreSSLVerify". Kr,

dennisnewel commented 5 years ago

this doesn't seem to work for me. No sure if it's because i'm using the Docker version or something in the configuration. I can see that the htmltest.yml file is picked up (i've set the DirectoryPath there) but i still get a ton of x509 errors that i'd love to be able to silence...

My .htmltest.yml file is:

IgnoreSSLVerify: true
DirectoryPath: "public"

and i'm running htmltest via this command:

docker run -v $(pwd):/test --rm wjdp/htmltest htmltest

For context, i'm trying to check a Hugo generated site

dennisnewel commented 5 years ago

sorry, just now realizing that the feature isn't included in the latest release 🤦‍♂

i'll try again once a new release have been cut