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

Allow regexp as options.origin #48

Closed
wants to merge 3 commits into from
Closed

Allow regexp as options.origin #48

wants to merge 3 commits into from

Conversation

alex94cp
Copy link
Contributor

This patch allows specifying an array of allowed origins or a regular expression for that matter in options.origin, eliminating the burden of having to define a function for such simple tasks. This is in answer to issue #42. Now with all unit tests passed.

@troygoode
Copy link
Member

thanks for the PR @alex94puchades - would you mind adding a unit test that covers the regexp usage?

@etiktin
Copy link
Contributor

etiktin commented May 28, 2015

@alex94puchades, the commits don't seem to include the array support.
I see you added it in #47, but then you closed it and opened this PR which seems to be missing it.
Can you please add it?

@alex94cp
Copy link
Contributor Author

@etiktin Sure, I'm planning to make a PR for that too (it's quite simple). I closed it because of some failing unit tests, which have been addressed in this PR, and I was waiting for this PR to be merged before adding array support (I'm not an expert in git, I'm afraid of breaking things) xD

@alex94cp
Copy link
Contributor Author

@etiktin This PR has been superseded by #50. It allows options.origin to be a regexp and also an array of string/regexp. I'm keeping this one open so that @troygoode can decide if both PR are good enough to be merged at the same time or suggest improvements for #50 while this one is ready to be merged.

@troygoode
Copy link
Member

closing this in favor of #50

@troygoode troygoode closed this May 28, 2015
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.

3 participants