Skip to content
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

URL not allowing all URLs #79

Open
victorb opened this issue Mar 4, 2016 · 1 comment
Open

URL not allowing all URLs #79

victorb opened this issue Mar 4, 2016 · 1 comment

Comments

@victorb
Copy link

victorb commented Mar 4, 2016

URL option does not allow us to pass options like www.ipfsbin.xyz because it's checking the TLD to match some arbitrary set of TLDs.

Example code:

#!/usr/bin/env node

var cli = require('../')

cli.parse({
  url: ['url', 'An URL', 'url'],
  secondurl: ['secondurl', 'An URL', 'url']
})

cli.main(function (args, options) {
  console.log(args)
  console.log(options)
})

Run with ./script.js --url something.xyz and options should include that URL but currently throws an exception instead...

Started trying to add something but saw a really scary regex for domain validation and secondly no tests so gave up pretty quickly. But wanted to let you know at least...

@egenerat
Copy link

egenerat commented Aug 4, 2019

Also http://localhost is not recognized as a valid URL, but http://127.0.0.1 works fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants