Skip to content
Back to skills

Orpc Simple Csrf Protection

ASecurity

Add basic CSRF protection to your oRPC application.

  • 8 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 12, 2026
developmentjavascriptjavagitapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned September 12, 2026

npx -y skills add ali-master/skills --skill orpc-simple-csrf-protection --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Orpc Simple Csrf Protection?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Orpc Simple Csrf Protection
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ali-master-orpc-simple-csrf-protection/badge)](https://www.skillsdirectory.com/skills/ali-master-orpc-simple-csrf-protection)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: oRPC Simple CSRF Protection Plugin
description: Add basic CSRF protection to your oRPC application.
license: MIT
metadata:
  author: Ali Torki
  homepage: https://github.com/ali-master
  version: "1.0.0"
---

# Simple CSRF Protection Plugin

Helps ensure requests originate from JavaScript code, not from HTML forms or direct browser navigation.

## When to Use

Beneficial if you store sensitive data (session/auth tokens) in cookies with `SameSite=Lax` (default) or `SameSite=None`.

## Server

```ts
import { SimpleCsrfProtectionHandlerPlugin } from '@orpc/server/plugins'

const handler = new RPCHandler(router, {
  strictGetMethodPluginEnabled: false, // Replace Strict Get Method Plugin
  plugins: [
    new SimpleCsrfProtectionHandlerPlugin()
  ],
})
```

## Client

```ts
import { SimpleCsrfProtectionLinkPlugin } from '@orpc/client/plugins'

const link = new RPCLink({
  url: 'https://api.example.com/rpc',
  plugins: [
    new SimpleCsrfProtectionLinkPlugin(),
  ],
})
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.