What is aptx-api-plugin-csrf?
使用 @aptx/api-plugin-csrf 添加 CSRF 保护。触发条件:当代码需要在请求中添加 CSRF token、配置 cookie/header 名称、处理 SSR/Node 环境的 cookie 读取、或使用 createCsrfMiddleware 时使用。 Source: haibaraaiaptx/aptx-skill.
使用 @aptx/api-plugin-csrf 添加 CSRF 保护。触发条件:当代码需要在请求中添加 CSRF token、配置 cookie/header 名称、处理 SSR/Node 环境的 cookie 读取、或使用 createCsrfMiddleware 时使用。
Quickly install aptx-api-plugin-csrf AI skill to your development environment via command line
Source: haibaraaiaptx/aptx-skill.
| cookieName | string | "XSRF-TOKEN" | CSRF cookie 名称 | | headerName | string | "X-XSRF-TOKEN" | 写入 CSRF token 的 header 名称 | | sameOriginOnly | boolean | true | 仅在同源请求中附加 token | | getCookie | (name) => string \| undefined | 浏览器默认使用 document.cookie | 自定义 cookie 读取函数(SSR 必须提供) |
| Cookie 存在 + sameOriginOnly: false | ✅ | | Cookie 存在 + sameOriginOnly: true + 同源请求 | ✅ | | Cookie 存在 + sameOriginOnly: true + 跨域请求 | ❌ | | Cookie 不存在 | ❌ |
| 环境 | document.cookie | window.location | 默认 getCookie | 默认 isSameOrigin |
使用 @aptx/api-plugin-csrf 添加 CSRF 保护。触发条件:当代码需要在请求中添加 CSRF token、配置 cookie/header 名称、处理 SSR/Node 环境的 cookie 读取、或使用 createCsrfMiddleware 时使用。 Source: haibaraaiaptx/aptx-skill.
Stable fields and commands for AI/search citations.
npx skills add https://github.com/haibaraaiaptx/aptx-skill --skill aptx-api-plugin-csrf使用 @aptx/api-plugin-csrf 添加 CSRF 保护。触发条件:当代码需要在请求中添加 CSRF token、配置 cookie/header 名称、处理 SSR/Node 环境的 cookie 读取、或使用 createCsrfMiddleware 时使用。 Source: haibaraaiaptx/aptx-skill.
Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/haibaraaiaptx/aptx-skill --skill aptx-api-plugin-csrf Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code, Cursor, or OpenClaw
https://github.com/haibaraaiaptx/aptx-skill