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

Fix/validate site name #1128

Merged
merged 3 commits into from
Feb 15, 2024
Merged

Fix/validate site name #1128

merged 3 commits into from
Feb 15, 2024

Conversation

alexanderleegs
Copy link
Contributor

Adds a middleware to validate proper site name for associated routes. This is a quick fix solution - see https://opengovproducts.slack.com/archives/C06FXS46AFP/p1707916279240099 for details.

@alexanderleegs alexanderleegs requested a review from a team February 14, 2024 14:14
Copy link
Contributor

@seaerchin seaerchin left a comment

Choose a reason for hiding this comment

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

Lgtm, are we not able to attach the middleware to the router as a whole?

@alexanderleegs
Copy link
Contributor Author

Lgtm, are we not able to attach the middleware to the router as a whole?

Hmm in order to retrieve siteName from params the middleware must be used in a route has already defined a :siteName in the route! So I put them in only after they were referenced

@alexanderleegs alexanderleegs merged commit 27a4a7c into develop Feb 15, 2024
11 checks passed
@mergify mergify bot deleted the fix/validate-site-name branch February 15, 2024 02:30
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