oRPC CORS Plugin

Installation
SKILL.md

CORS Plugin

CORSPlugin allows you to configure CORS for your API.

Basic

import { CORSPlugin } from '@orpc/server/plugins'

const handler = new RPCHandler(router, {
  plugins: [
    new CORSPlugin({
      origin: (origin, options) => origin,
      allowMethods: ['GET', 'HEAD', 'PUT', 'POST', 'DELETE', 'PATCH'],
      // ...
    }),
  ],
})
Installs
First Seen
oRPC CORS Plugin — ali-master/skills