safe-url
v1.0.1
Published
Scrub basic auth credentials from your urls so they're safe urls
Downloads
54
Maintainers
Readme
safe-url
have you ever wanted to print out a url, but were worried about logging basic auth credentials? this module will do its best to scrub them out.
note, this comes at ABSOLUTELY NO GUARANTEE on my part, and if you are truly concerned about security, either fork and manually review or find a different dependency.
example
> var safeUrl = require('./');
undefined
> var url = 'https://iamauser:[email protected]'
undefined
> safeUrl(url)
'https://iamauser:******@this.is.my.couch.trashfire.xyz'
>
credits
this implementation was extracted from @mikeal's couchapp module many years ago.
license
this project would be covered under the same license as the couchapp project. unfortunately, it's what you might call "poorly licensed." using it in MIT projects is probably safe, but if it's important to you then you'll have to ask Mikeal.