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

Simpler Allow method version, also return * for allow-origin when supplied as * in options #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ryanthecubfan
Copy link

Reasoning:

Creation of the options object to pass to the existing Allow() made client code needlessly verbose - a simple version that supplies the three most often used CORS headers makes martini setup code much more readable and clean.

Regarding the * - it seemed unintuitive that whatever origin request header was sent was coming even though my client code was passing a * into the handler. Line 73 change remedies that condition.

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.

None yet

1 participant