Skip to content

Commit

Permalink
Dont allow browser to open insecure pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Pouyan Azari committed Jul 10, 2019
1 parent eb5452b commit f38bcf0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## [0.0.7] 2019-07-10

- Dont Allow the browser to open insecure pages.

## [0.0.6] 2019-07-09

- Remove the panic from the navigation part
Expand Down
10 changes: 8 additions & 2 deletions collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,16 @@ func getChromeOptions() agouti.Option {
})
}

/// getChromeExcludedOptions Returns the excluded options
func getChromeExcludedOptions() agouti.Option {
return agouti.ChromeOptions("excludeSwitches", []string{
"ignore-certificate-errors",
})
}

///startDriver Starts the given driver on the machine
func startDriver() *agouti.WebDriver {
driver := agouti.ChromeDriver(getChromeOptions())
driver := agouti.ChromeDriver(getChromeOptions(), getChromeExcludedOptions(), agouti.RejectInvalidSSL)
if err := driver.Start(); err != nil {
logger.WithFields(
log.Fields{
Expand Down Expand Up @@ -479,7 +486,6 @@ func getStatus(config SingleLoginConfig) (status bool, elapsed float64) {
}
end := time.Now()
elapsed = end.Sub(start).Seconds()

// logout if the value is set
if config.LogoutXpath != "" {
logOut(page, config.LogoutXpath, config.SubmitType)
Expand Down

0 comments on commit f38bcf0

Please sign in to comment.