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

Check if CORS is enabled on a request only once #150

Closed
wants to merge 1 commit into from

Conversation

adamchainz
Copy link
Owner

Fixes #91. Checking if CORS should be enabled for a request is potentially expensive via the regexes and now the signal. To avoid incurring that cost now we cache the result on the request rather than recompute it at each step in the middleware.

@adamchainz adamchainz force-pushed the issue_91_check_enabled_only_once branch from 070f133 to 151c8b1 Compare October 19, 2016 19:15
Fixes #91. Checking if CORS should be enabled for a request is potentially expensive via the regexes and now the signal. To avoid incurring that cost now we cache the result on the request rather than recompute it at each step in the middleware.
@adamchainz adamchainz force-pushed the issue_91_check_enabled_only_once branch from 151c8b1 to d7dde0b Compare October 19, 2016 20:45
@adamchainz adamchainz self-assigned this Oct 30, 2016
@adamchainz adamchainz closed this Nov 6, 2016
@adamchainz adamchainz deleted the issue_91_check_enabled_only_once branch November 6, 2016 10:54
adamchainz pushed a commit that referenced this pull request Nov 9, 2016
Added in the single 'is enabled' check from #150 / 7c6cfaa.
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.

1 participant