hgweb and automatic https browser switching

David Demelier markand at malikania.fr
Tue Oct 12 11:21:32 UTC 2021


Hi there,

I’ve been using hgweb for more than a decade to serve my repositories using the same hostname for both pulling and pushing. The only difference is that I always used plain http:// for read-only access and https:// using web server basic auth for pushing.

Those days I’m getting more complaints that users are not able to see my repositories because their browser automatically selects https:// when typing the website without a specific scheme and because there is basic auth they end in a 403.

Someone on IRC told me that there is a way to implement authentication only when pushing. Is it possible? I mean, allowing https:// access without authentication as long as the user is only reading and requesting authentication only when pushing?

Maybe Mercurial use different HTTP routes that I can select in the web server configuration at that time?

I definitely want to keep using the same hostname for both because it’s more convenient. Using SSH isn’t an option either.

Any recommandations is welcome.

Regards

— 
David


More information about the Mercurial mailing list