Support (or don't support) including a port number in --trusted-host
See original GitHub issueWhat’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:
$ pip install -i http://localtest.me:5000 urllib3 --trusted-host localtest.me:5000
Looking in indexes: http://localtest.me:5000
Collecting urllib3
The repository located at localtest.me is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host localtest.me'.
Could not find a version that satisfies the requirement urllib3 (from versions: )
No matching distribution found for urllib3
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
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Trusted Host settings | Installing Drupal
Help improve this page · Log in, click Edit, and edit this page · Log in, click Discuss, update the Page status value,...
Read more >Service overview and network port requirements for Windows
A roadmap of ports, protocols, and services that are required by Microsoft client and server operating systems, server-based applications, ...
Read more >Port numbers, URLs, and IP addresses | Deep Security
Deep Security default port numbers, URLs, IP addresses, and protocols are listed in the sections below. If a port, URL or IP address...
Read more >If your computer doesn't recognize your iPhone or iPad
Don't connect to a USB hub, display, or other device. If that doesn't help, disconnect your device and all other USB devices and...
Read more >Powershell remoting with ip-address as target - Stack Overflow
For more information, see the about_Remote_Troubleshooting Help topic. Edit3: I know about the trusted-hosts setting of WSMan, but that doesn't ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@cjerdonek I have created a PR #6909 together with some test cases to illustrate the changes.
@cjerdonek Great, I will take a look when I get a chance.