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

Incorrectly pick up cdn.blah.com.s3.amazonaws.com #6

Closed
hongkongkiwi opened this issue Feb 3, 2016 · 4 comments
Closed

Incorrectly pick up cdn.blah.com.s3.amazonaws.com #6

hongkongkiwi opened this issue Feb 3, 2016 · 4 comments

Comments

@hongkongkiwi
Copy link

Parsing s3 domain urls seems to be incorrect:

For example: cdn.blah.com.s3.amazonaws.com
{ tld: 's3.amazonaws.com',
domain: 'com',
subdomain: 'cdn.blah' }

In this case, it should pick up .com from the right hand side (obviously), then amazonaws as the domain, with: cdn.blah.com.s3 as the subdomain

@hongkongkiwi
Copy link
Author

So from looking through the public suffix list which you use, we they have a section for ICANN domains and private domains. In my code, I think it's appropriate to switch off processing of 'private' domains. I'll submit a pull request later for this option, it shouldn't significantly affect the code, just provide some extra options for those of us that need it.

@alsotang
Copy link
Contributor

+1
just use icann domains

@alsotang
Copy link
Contributor

alsotang commented Oct 11, 2016

I think we can provide a icann options, such as:

parseDomain("foo.blogspot.com", {icann: true}) => {domain: blogspot, subdomain: foo, tld: com}

@jhnns
Copy link
Member

jhnns commented Oct 14, 2016

Shipped with 1.0.0

@jhnns jhnns closed this as completed Oct 14, 2016
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

3 participants