Add `removePort` option
See original GitHub issueIn the Docs, you have an example that has a port on a url and then when you wrap the url with “normalizeUrl” the port is no longer included:
When I run this same example locally, the Port :80/
is still included - which is different behavior from what your documentation example above shows:
How would I remove the :80/
port portion of a url with your package ?
I am pretty sure there is a bug because when I did another test the behavior is not consistent. As you can see in the image below, the results are not consistent just by changing a url from having http
too https
and also I see that just changing the actual number for the port in the url makes the behavior different too:
Issue Analytics
- State:
- Created a year ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
How to remove access to a port using firewall on Centos7?
Solution: Do not forget the --runtime-to-permanent $ firewall-cmd --zone=public --remove-port=10050/tcp $ firewall-cmd ...
Read more >Add or remove ports from a broadcast domain
Display the ports that are currently assigned or unassigned to a broadcast domain by using the network port show command. · Add or...
Read more >Firewalld Add New Port, List All Ports, Remove Port with ...
Firewalld Add New Port, List All Ports, Remove Port with firewall-cmd command in Oracle Linux 7.
Read more >How to remove port number from URL when running npm start?
I believe the solution is to drop the https:// at the start of your host option, and change the port to 80. However,...
Read more >can't remove port-security maximum - Cisco Community
I've done those steps, no change. And it didn't do that to the couple thousand other similar ports with a phone/pc (ie two...
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 Free
Top 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
@ianizaguirre
I think
removePort
should be rename tounsafeRemovePort
, or current naming styleforceRemovePort
.Because https://example.com:80 and https://example.com is NOT SAME AT ALL, they MAY just happen to LOOK same in specific cases.
This suggestion may prevent confusion with the
safe remove port
, like remove:80
fromhttp
and remove:443
fromhttps
.@sindresorhus
Pull request has been created: https://github.com/sindresorhus/normalize-url/pull/174