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

PB-796: remove CommonMiddlewareWithInternalRedirect. #462

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

adk-swisstopo
Copy link
Member

In #440 we added CommonMiddlewareWithInternalRedirect to respond to URLs that don't end with a trailing slash without user-visible redirection. This was primarily done to handle a limitation of AWS API Gateway v1. We eventually decided to use API Gateway v2 which does not have this limitation.

Hence, we remove this code that is not useful and update the tests accordingly. This is basically a revert of #440 although we keep some of the test refactoring/improvements.

In #440 we added
CommonMiddlewareWithInternalRedirect to respond to URLs that don't end
with a trailing slash without user-visible redirection. This was primarily
done to handle a limitation of AWS API Gateway v1. We eventually decided to
use API Gateway v2 which does not have this limitation.

Hence, we remove this code that is not useful and update the tests accordingly.
This is basically a revert of #440
although we keep some of the test refactoring/improvements.
This should fix the following failure:

```
app/tests/test_admin_page.py:337:25: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation)
```
Copy link
Contributor

@boecklic boecklic left a comment

Choose a reason for hiding this comment

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

👍 thanks for cleaning up again!

@adk-swisstopo adk-swisstopo merged commit 073befa into develop Sep 25, 2024
3 checks passed
@adk-swisstopo adk-swisstopo deleted the feat-PB-796-trailing-slash branch September 25, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants