headzoo / surf

Stateful programmatic web browsing in Go.
MIT License
1.49k stars 160 forks source link

Not compitable with https #88

Closed killernova closed 6 years ago

killernova commented 6 years ago

When requests url with https, an error occurs: x509: certificate has expired or is not yet valid

Joffcom commented 6 years ago

I have been using it with https, are you using a self signed certificate?

killernova commented 6 years ago

@Joffcom Yes, this problem will only occur when visit a self-signed certificate website, is there any solutions?

Joffcom commented 6 years ago

Have a look at the browser.SetTransport method it allows you to set options for the http client so may do what you are after.

I won’t be able to check for a few hours but that is where I would start.

killernova commented 6 years ago

This solves my problem, thanks so much! The issue could be closed now.