-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: Allow wildcard hostnames #347
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🏁 Looks good to me 😃
RIP. The asset wasn't captured. Let me see why locally |
2a99a7f
to
bf25dc3
Compare
Unrelated, it looks like the CSSOM test flaked in one of the CI runs 🤔 |
Oh weird, that looks like the live site failed to be requested or something 🤔 Another case for #304 |
bf25dc3
to
06b3a28
Compare
The domain-match package had an issue where it was comparing hosts including the port number. Updated the approach (and PR description) to copy the small util over and update it to not use the port number. @Robdel12 could you re-review, including that new util file? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🏁 Very nice, I like the new approach a lot more. Less dependencies
# [0.14.0](v0.13.0...v0.14.0) (2019-09-18) ### Features * ✨ Allow wildcard hostnames ([#347](#347)) ([730161f](730161f))
Purpose
When the subdomain of a hostname is variable, not known, or has many other subdomains, it is more concise to use a wildcard subdomain.
Approach
Attempted to use
domainMatch
to compare the resource hostname with the allowed hostnames. However internally, the package usesparsedURL.host
which contains the port number and causes the check to fail. The source code was fairly small and straightforward, so I copied it here and adjusted it to usehostname
which does not contain the port number.Copying the small util here also made typescript happy about missing type defs.