Back to skills
SKILL.md
Orpc Response Headers
ASecuritySet response headers in oRPC.
- 8 stars
- 0 votes
- 0 copies
- 2 views
- Added September 12, 2026
Security analysis
100/100npx -y skills add ali-master/skills --skill orpc-response-headers --agent claude-codeAre you the author of Orpc Response Headers?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ali-master-orpc-response-headers)---
name: oRPC Response Headers Plugin
description: Set response headers in oRPC.
license: MIT
metadata:
author: Ali Torki
homepage: https://github.com/ali-master
version: "1.0.0"
---
# Response Headers Plugin
Injects a `resHeaders` instance into the `context`, enabling you to modify response headers.
## Context Setup
```ts
import { setCookie } from '@orpc/server/helpers'
import { ResponseHeadersPluginContext } from '@orpc/server/plugins'
interface ORPCContext extends ResponseHeadersPluginContext {}
const base = os.$context<ORPCContext>()
const example = base
.use(({ context, next }) => {
context.resHeaders?.set('x-custom-header', 'value')
return next()
})
.handler(({ context }) => {
setCookie(context.resHeaders, 'session_id', 'abc123', {
secure: true,
maxAge: 3600
})
})
```
> `resHeaders` can be `undefined` to allow procedures to run safely without the plugin (e.g., direct calls).
> Combine with [Cookie Helpers](/docs/helpers/cookie) for streamlined cookie management.
## Handler Setup
```ts
import { ResponseHeadersPlugin } from '@orpc/server/plugins'
const handler = new RPCHandler(router, {
plugins: [new ResponseHeadersPlugin()],
})
```
Attribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.