mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
[DEV] Set chromedriver path with env variable (#1123)
This commit is contained in:
parent
e43bc93047
commit
61883437cc
|
@ -21,7 +21,12 @@ type WebDriverSession struct {
|
|||
|
||||
// StartWebDriverWithProxy create a selenium session.
|
||||
func StartWebDriverWithProxy(proxy string, port int) (*WebDriverSession, error) {
|
||||
service, err := selenium.NewChromeDriverService("/usr/bin/chromedriver", port)
|
||||
driverPath := os.Getenv("CHROMEDRIVER_PATH")
|
||||
if driverPath == "" {
|
||||
driverPath = "/usr/bin/chromedriver"
|
||||
}
|
||||
|
||||
service, err := selenium.NewChromeDriverService(driverPath, port)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in New Issue
Block a user