Navigation Menu

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

x/pkgsite: in cmd/frontend's --proxy_url argument, exclude localhost from https requirement #40123

Open
shsms opened this issue Jul 8, 2020 · 2 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite

Comments

@shsms
Copy link

shsms commented Jul 8, 2020

What did you do?

I tried to start pkgsite/cmd/frontend using this command line:

./frontend --direct_proxy --proxy_url http://localhost:3000

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:

Error: proxy.New("http://localhost:3000"): scheme must be https (got http)

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.

@gopherbot gopherbot added this to the Unreleased milestone Jul 8, 2020
@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jul 11, 2020
@dmitshur
Copy link
Contributor

/cc @julieqiu per owners.

@jba
Copy link
Contributor

jba commented Sep 15, 2020

I have no objection to allowing the http scheme regardless of the rest of the URL. That seems like a risk the flag-provider can easily weigh for themselves.

@jba jba self-assigned this Sep 15, 2020
@jba jba modified the milestones: Unreleased, pkgsite/unplanned Sep 15, 2020
@julieqiu julieqiu removed the website label Sep 19, 2020
@julieqiu julieqiu removed the website label Sep 22, 2020
@rsc rsc unassigned jba Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite
Projects
None yet
Development

No branches or pull requests

5 participants