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

🐛 [#2146] Avoid KvK branch select redirects for media files #1052

Merged
merged 2 commits into from
Feb 26, 2024

Conversation

stevenbal
Copy link
Contributor

Copy link
Contributor

@pi-sigma pi-sigma left a comment

Choose a reason for hiding this comment

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

This is fine by me, though I wonder if it would be worthwhile to address this kvk-redirect issue in a more principled way. The middleware approach I adopted seems to be causing more problems than it solves. Perhaps a mixin, applied to select views, would be a better approach. Let's discuss next week.

Copy link
Contributor

@Bartvaderkin Bartvaderkin left a comment

Choose a reason for hiding this comment

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

Do we also need this for the static and private-media?

@stevenbal
Copy link
Contributor Author

@Bartvaderkin static files if served via Django don't seem to trigger the middleware, and on staging/production I assume we serve staticfiles via nginx (https://bitbucket.org/maykinmedia/maykin-deployment/src/f5a08f425136c452553d0f30cd1b33cbb684ef47/projects/open-inwoner/nginx-production.conf#lines-66)

I just saw that we serve media files via nginx as well, but at least this fix makes this branch selection screen less slow locally.

I'm not sure if private media could pose an issue here, but I suppose it can't hurt to add a bypass for it in the middleware

@stevenbal stevenbal force-pushed the fix/2146-kvk-middleware-redirects-all-requests branch from a650d33 to 09db913 Compare February 26, 2024 10:25
@stevenbal stevenbal merged commit 2d1e090 into develop Feb 26, 2024
15 checks passed
@stevenbal stevenbal deleted the fix/2146-kvk-middleware-redirects-all-requests branch February 26, 2024 11:10
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