Skip to content

Commit cefce23

Browse files
committed
Adding ignore-certificate-errors Chrome option
1 parent 55a5231 commit cefce23

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

main.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,13 @@ func main() {
8787
return
8888
}
8989

90-
pctx, pcancel := chromedp.NewContext(context.Background())
90+
copts := append(chromedp.DefaultExecAllocatorOptions[:],
91+
chromedp.Flag("ignore-certificate-errors", true),
92+
)
93+
ectx, ecancel := chromedp.NewExecAllocator(context.Background(), copts...)
94+
defer ecancel()
95+
96+
pctx, pcancel := chromedp.NewContext(ectx)
9197
defer pcancel()
9298

9399
// start the browser to ensure we end up making new tabs in an

0 commit comments

Comments
 (0)