-
-
Notifications
You must be signed in to change notification settings - Fork 386
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
feat: OpenAPI plugins send CSRF request header #3754
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3754 +/- ##
=======================================
Coverage 98.35% 98.35%
=======================================
Files 331 331
Lines 15277 15287 +10
Branches 2445 2447 +2
=======================================
+ Hits 15025 15035 +10
Misses 112 112
Partials 140 140 ☔ View full report in Codecov by Sentry. |
9c4cd34
to
59c219f
Compare
Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/3754 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for these changes!
@all-contributors add @floxay for code and tests |
I've put up a pull request to add @floxay! 🎉 |
Supported OpenAPI UI clients will extract the CSRF cookie value and attach it to the request headers if CSRF is enabled on the application.
Scalar (scalar/scalar#2810), Redoc and (Stoplight) Elements does not seem to support interceptors or some other mechanism to achieve this.
Currently it also sends the header on "safe" methods but for both currently supported UI clients (Swagger and RapiDoc) it's possible to limit this to "unsafe" methods only, if required.