-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Support (or don't support) including a port number in --trusted-host #6886
Comments
To add more info to the description above, currently, pip "happens" to behave correctly for HTTPS URL's when
So the question is whether to officially support port numbers or not. If so, we should add support for HTTP and update the documentation to say that port numbers are allowed. If not, we should probably deprecate allowing port numbers to be included in |
@frostming I'm thinking we should add official support for this, in part because pip's code is already structured to support it. Would you be able to work up a PR? It's probably easiest to do it after PR #6903 is merged (or build the changes on top of those changes). |
PR #6903 has been merged, FYI. |
@cjerdonek Great, I will take a look when I get a chance. |
@cjerdonek I have created a PR #6909 together with some test cases to illustrate the changes. |
What's the problem this feature will solve?
Refer to #6705
for HTTP indexes,
--trusted-host
option should be sans-port, if you give a port part then it aborts:While for HTTPS indexes,
--trusted-host
should carry the port. (Now a fix is landed on master to support both, with port and without port).Describe the solution you'd like
Pip should handle trusted-host correctly, whether the host has a port part or not.
with
--trusted-host example.org
you trust all the subpaths and wildcard ports on the same host.with
--trusted-host example.org:8080
you only trust requests to 8080 port.Alternative Solutions
Additional context
The text was updated successfully, but these errors were encountered: