mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
Enable csrf tokens on API routes
* Upgrade openapi-ts * Migrate openapi-ts settings to new version * Add csrf token to headers of all API calls * Force csrf token authentication on API routes
This commit is contained in:
@ -27,7 +27,7 @@ handler403 = "core.views.forbidden"
|
||||
handler404 = "core.views.not_found"
|
||||
handler500 = "core.views.internal_servor_error"
|
||||
|
||||
api = NinjaExtraAPI(version="0.2.0", urls_namespace="api")
|
||||
api = NinjaExtraAPI(version="0.2.0", urls_namespace="api", csrf=True)
|
||||
api.auto_discover_controllers()
|
||||
|
||||
urlpatterns = [
|
||||
|
Reference in New Issue
Block a user