aws4
aws4 copied to clipboard
Added SanitizeHost to fix host / hostname with protocol
I've added a method to remove http
and https
protocols in case the user passes it in the request. It might be an edge case but improves the safety of the code. Also added some test cases.
+1 is there something preventing this PR from being merged? Would love to see it in a release 😄
Yeah, hard to balance something like this – a host
isn't a URL, so I'm not sure it's really justified adding code to cover this edge case
I somewhat agree, if the library shouldn't sanitise, then it could at least throw some sort of validation error?