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

fix: add domain validation at UrlBuilder initialization #41

Merged
merged 2 commits into from
Apr 8, 2019

Conversation

sherwinski
Copy link
Contributor

@sherwinski sherwinski commented Apr 6, 2019

Adds a validation that will throw an error if a user attempts to initialize a new UrlBuilder object with an invalid domain.
The validation criteria is based off of the same regex used on dashboard.imgix.com

Fixes #10

@sherwinski sherwinski requested a review from jayeb April 6, 2019 21:24
Copy link
Contributor

@jayeb jayeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two little comments, but otherwise this is looking good.

src/Imgix/UrlBuilder.php Outdated Show resolved Hide resolved
src/Imgix/UrlBuilder.php Outdated Show resolved Hide resolved
@sherwinski sherwinski requested a review from jayeb April 8, 2019 17:57
@sherwinski sherwinski merged commit d98ba0b into master Apr 8, 2019
@sherwinski sherwinski deleted the domain-validation branch April 8, 2019 18:05
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

Successfully merging this pull request may close these issues.

2 participants