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

Updating docs to show the importance of unsetting the tenant in a middleware #173

Merged
merged 1 commit into from
May 27, 2023

Conversation

arpanpreneur
Copy link
Contributor

In the middleware example, it is assumed the user always has to have a tenant set. However, it is often better to unset the tenant in the middleware after the request is processed as it is using thread-local. As a rule of thumb, any thread-local should be cleared after request processing in a webserver because webservers reuse threads/processes.

in middleware example
@arpanpreneur
Copy link
Contributor Author

@microsoft-github-policy-service agree

@gurkanindibay gurkanindibay self-requested a review May 27, 2023 18:32
@cristiangrojas
Copy link

Hey!

I'd an issue I've been workin on for the last 5 days with no luck.

Just comed to this PR and it's definitely A MUST HAVE to avoid inconsistency in server responses.

Posted this question in StackOverflow I'll be updating with the solution soon

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