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

Don’t try to set tenant in middleware if it is already set. #193

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

Conversation

jaydensmith
Copy link

In my application, I have another middleware that sets the tenant based on a header if present. This change is necessary to prevent overriding the previous middleware.

@lorinkoz
Copy link
Owner

lorinkoz commented Nov 2, 2023

Sounds reasonable. Would you please add a small test to cover the new behavior?

@lorinkoz
Copy link
Owner

Quick update: I plan on also providing middleware for different types of tenant routing in v1, applying some ideas I used in another package. Stay tuned.

However, the final approach should be that, when multiple routing middleware are combined, the last one prevails.

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

2 participants