·aptx-api-plugin-csrf
!

aptx-api-plugin-csrf

使用 @aptx/api-plugin-csrf 添加 CSRF 保护。触发条件:当代码需要在请求中添加 CSRF token、配置 cookie/header 名称、处理 SSR/Node 环境的 cookie 读取、或使用 createCsrfMiddleware 时使用。

20Installs·0Trend·@haibaraaiaptx

Installation

$npx skills add https://github.com/haibaraaiaptx/aptx-skill --skill aptx-api-plugin-csrf

How to Install aptx-api-plugin-csrf

Quickly install aptx-api-plugin-csrf AI skill to your development environment via command line

  1. Open Terminal: Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.)
  2. Run Installation Command: Copy and run this command: npx skills add https://github.com/haibaraaiaptx/aptx-skill --skill aptx-api-plugin-csrf
  3. Verify Installation: Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code, Cursor, or OpenClaw

Source: haibaraaiaptx/aptx-skill.

SKILL.md

View raw

| 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.

Facts (cite-ready)

Stable fields and commands for AI/search citations.

Install command
npx skills add https://github.com/haibaraaiaptx/aptx-skill --skill aptx-api-plugin-csrf
Category
!Security
Verified
First Seen
2026-02-25
Updated
2026-03-10

Browse more skills from haibaraaiaptx/aptx-skill

Quick answers

What is aptx-api-plugin-csrf?

使用 @aptx/api-plugin-csrf 添加 CSRF 保护。触发条件:当代码需要在请求中添加 CSRF token、配置 cookie/header 名称、处理 SSR/Node 环境的 cookie 读取、或使用 createCsrfMiddleware 时使用。 Source: haibaraaiaptx/aptx-skill.

How do I install aptx-api-plugin-csrf?

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

Where is the source repository?

https://github.com/haibaraaiaptx/aptx-skill