x/pkgsite: in cmd/frontend's --proxy_url argument, exclude localhost from https requirement #40123
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
pkgsite
Milestone
What did you do?
I tried to start
pkgsite/cmd/frontend
using this command line:I want to use
http://localhost:3000
with the--proxy_url
argument, because I'm trying to create a small kubernetes deployment with the athens module proxy and pkgsite in the same pod.What did you expect to see?
pkgsite/cmd/frontend starts without errors using
http://localhost:3000
as the proxy url.What did you see instead?
The below fatal error:
In https://github.com/golang/pkgsite/blob/master/internal/proxy/client.go#L53 if we exclude localhost from the https requirement, that would solve my immediate problem.
But later on, if we want to move athens and pkgsite into their own separate deployments, I'll have to point pkgsite to
http://athens.develop:3000
, and that won't work (we don't have https for communication within the cluster)If we want to allow all such internal communications, another option would be to resolve the hostname, and if it is in a private IP address range, then don't expect https. But I'm not sure if that would have implications in other private IP situations.
The text was updated successfully, but these errors were encountered: