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

Optimize applyHeaders by removing the closure #35

Merged
merged 1 commit into from
Jan 20, 2015
Merged

Optimize applyHeaders by removing the closure #35

merged 1 commit into from
Jan 20, 2015

Conversation

raymondfeng
Copy link
Contributor

The PR improves the performance for the CORS middleware:

  1. Remove Array.forEach() to avoid creation of closures
  2. Refactor applyHeaders to a standalone function for better reuse

@raymondfeng
Copy link
Contributor Author

@troygoode Any chance to review the PR?

@troygoode
Copy link
Member

That looks good @raymondfeng. I'll merge & release on npm.

troygoode added a commit that referenced this pull request Jan 20, 2015
Optimize applyHeaders by removing the closure
@troygoode troygoode merged commit d7d8c79 into expressjs:master Jan 20, 2015
@troygoode
Copy link
Member

@raymondfeng This has been released to npm as version 2.5.3. I've also added you as a collaborator. Thank you for the contribution!

@raymondfeng
Copy link
Contributor Author

@troygoode Thank you for the trust!

@troygoode
Copy link
Member

No problem @raymondfeng. I love the work you guys at doing at StrongLoop. Sorry I didn't see the PR last week - somehow slipped through my inbox!

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