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 API deletes #70

Merged
merged 3 commits into from
Mar 19, 2024
Merged

Fix API deletes #70

merged 3 commits into from
Mar 19, 2024

Conversation

meksor
Copy link
Contributor

@meksor meksor commented Mar 18, 2024

Currently on the production setup deletes fail because no trailing slash is added in the api layer and there is some mishap in how that request is redirected...
I've fixed the api layer and set redirect_slashes=False for fastapi. All requests to endpoints without trailing slashed will thus result in a 404.
The docs are now also served with trailing slashes so i can use an nginx rewrite instead of the fastapi redirect.
Should fix #57

Copy link
Contributor

@pmussak pmussak left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@glatterf42 glatterf42 left a comment

Choose a reason for hiding this comment

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

Looks good to me :)

Why do we need to set docs_url and redoc_url specifically?

@meksor
Copy link
Contributor Author

meksor commented Mar 19, 2024

Why do we need to set docs_url and redoc_url specifically?

Because otherwise they are served at a location without a trailing slash.

@meksor meksor merged commit 59e7337 into main Mar 19, 2024
6 checks passed
@meksor meksor deleted the bugfix/api-deletes branch March 19, 2024 14:01
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.

Deleting the docs via Rest fails on a production instance
3 participants