Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edge auto-switches to HTTPS when accessing HTTP, how to disable this feature #1141

Closed
ChuckWe opened this issue Nov 11, 2024 · 2 comments
Closed
Labels
question Questions related to rod

Comments

@ChuckWe
Copy link

ChuckWe commented Nov 11, 2024

Rod Version: v0.116.2
Edge Version: 130.0.2849.80(x86_64)
OS Version: mac 13.4.1

The code to demonstrate your question

I've tried a lot and disabled many flags, but none of them worked. Here is my latest code:

func Init(ctx gctx.Ctx) *PreTest {
	// create context
	u := launcher.New().Bin(filepath.Clean(consts.BrowserPath)).Headless(false).
		Set("allow-running-insecure-content").
		Set("disable-web-security").
		Set("ignore-certificate-errors").
		Set("ignore-certificate-errors-spki-list").
		Set("ignore-ssl-errors").
		Set("no-first-run").
		Set("safebrowsing-disable-auto-update").
		Logger(os.Stdout).MustLaunch()
	broswerClient := rod.New().Context(ctx).ControlURL(u).MustConnect()
	return &PreTest{ctx: ctx, browser: broswerClient}
}

func (p *PreTest) RunAway() {
	page := p.browser.NoDefaultDevice().MustIgnoreCertErrors(true).MustPage()
	page.MustWindowFullscreen()
	page.Navigate("http://xxxx.com/login.htm")
	time.Sleep(1000*time.Second)
}

I tried to access an HTTP page, but the browser automatically switched to HTTPS when debugging, and I couldn't disable this feature.
But the website I am visiting only has HTTP and not HTTPS.

@ChuckWe ChuckWe added the question Questions related to rod label Nov 11, 2024
Copy link

Please fix the format of your markdown:

9:6 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
31 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"]

generated by check-issue

@ChuckWe
Copy link
Author

ChuckWe commented Nov 12, 2024

I found a solution from the issue at chromedp/chromedp#1498 (comment)

with launch flag --disable-features=HttpsUpgrades

@ChuckWe ChuckWe closed this as completed Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions related to rod
Projects
None yet
Development

No branches or pull requests

1 participant