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

Improve CSRF detection in Swagger docs (add_csrf) #1161

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

antonrh
Copy link
Contributor

@antonrh antonrh commented May 10, 2024

This PR updates the logic for determining whether to add CSRF headers for Swagger docs. The _csrf_needed helper will now rely on checking auth_callbacks by operation, rather than on the NinjaAPI instance. The NinjaAPI.csrf is now completely ignored and can be safely removed in the future.

@antonrh antonrh changed the title Improve Swagger csrf detection WIP: Improve Swagger csrf detection May 10, 2024
@antonrh antonrh marked this pull request as ready for review May 10, 2024 11:41
@antonrh antonrh changed the title WIP: Improve Swagger csrf detection Improve Swagger docs csrf detection (add_csrf) May 10, 2024
@antonrh antonrh changed the title Improve Swagger docs csrf detection (add_csrf) Improve CSRF detection in Swagger docs (add_csrf) May 10, 2024
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

1 participant