feat: add csrf

This commit is contained in:
2026-04-19 11:32:47 +03:00
parent 17855ecd87
commit 517df542e1
9 changed files with 4827 additions and 8 deletions

View File

@@ -47,6 +47,34 @@
}
},
"paths": {
"/csrf/token": {
"get": {
"summary": "Issue CSRF token (sets cookie, returns token for X-CSRF-Token header)",
"tags": ["System"],
"responses": {
"200": {
"description": "CSRF token issued",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": { "type": "boolean", "example": true },
"data": {
"type": "object",
"properties": {
"token": { "type": "string" },
"header_name": { "type": "string", "example": "X-CSRF-Token" }
}
}
}
}
}
}
}
}
}
},
"/health": {
"get": {
"summary": "Health check",