Skip to content

Conversation

@JamesNK
Copy link
Member

@JamesNK JamesNK commented Jan 3, 2019

No-op AuthorizeFilter when AuthorizationMiddleware has run for performance

Addresses #4216

@JamesNK JamesNK requested review from HaoK and rynowak January 3, 2019 22:06
@JamesNK JamesNK force-pushed the jamesnk/authz-filter-noop branch from 1625cb1 to d586d67 Compare January 4, 2019 02:35
Copy link
Member

@rynowak rynowak left a comment

Choose a reason for hiding this comment

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

LGTM but get a signoff from @HaoK as well

@JamesNK JamesNK force-pushed the jamesnk/authz-filter-noop branch from d586d67 to cab74af Compare January 15, 2019 03:37
@JamesNK JamesNK requested a review from Tratcher as a code owner January 15, 2019 03:37
@JamesNK JamesNK merged commit 09b5085 into master Jan 15, 2019
@huan086
Copy link
Contributor

huan086 commented Jan 17, 2019

Another minor performance improvement in CorsOptions

Instead of having to compute the hash key twice
return PolicyMap.ContainsKey(name) ? PolicyMap[name] : null;

Use
return PolicyMap.TryGetValue(name, out var policies) ? policies : null;

@JamesNK JamesNK deleted the jamesnk/authz-filter-noop branch January 17, 2019 04:23
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.

6 participants