Socket
Socket
Sign inDemoInstall

@elysiajs/cors

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elysiajs/cors - npm Package Compare versions

Comparing version 0.3.0-beta.0 to 0.3.0

7

dist/index.d.ts
/// <reference types="bun-types" />
import type { Elysia } from 'elysia';
declare type Origin = string | RegExp | ((request: Request) => boolean | void);
export declare type HTTPMethod = 'ACL' | 'BIND' | 'CHECKOUT' | 'CONNECT' | 'COPY' | 'DELETE' | 'GET' | 'HEAD' | 'LINK' | 'LOCK' | 'M-SEARCH' | 'MERGE' | 'MKACTIVITY' | 'MKCALENDAR' | 'MKCOL' | 'MOVE' | 'NOTIFY' | 'OPTIONS' | 'PATCH' | 'POST' | 'PROPFIND' | 'PROPPATCH' | 'PURGE' | 'PUT' | 'REBIND' | 'REPORT' | 'SEARCH' | 'SOURCE' | 'SUBSCRIBE' | 'TRACE' | 'UNBIND' | 'UNLINK' | 'UNLOCK' | 'UNSUBSCRIBE';
type Origin = string | RegExp | ((request: Request) => boolean | void);
export type HTTPMethod = 'ACL' | 'BIND' | 'CHECKOUT' | 'CONNECT' | 'COPY' | 'DELETE' | 'GET' | 'HEAD' | 'LINK' | 'LOCK' | 'M-SEARCH' | 'MERGE' | 'MKACTIVITY' | 'MKCALENDAR' | 'MKCOL' | 'MOVE' | 'NOTIFY' | 'OPTIONS' | 'PATCH' | 'POST' | 'PROPFIND' | 'PROPPATCH' | 'PURGE' | 'PUT' | 'REBIND' | 'REPORT' | 'SEARCH' | 'SOURCE' | 'SUBSCRIBE' | 'TRACE' | 'UNBIND' | 'UNLINK' | 'UNLOCK' | 'UNSUBSCRIBE';
interface CORSConfig {

@@ -15,6 +15,7 @@ origin?: Origin | boolean | Origin[];

export declare const cors: ({ origin, methods, allowedHeaders, exposedHeaders, credentials, maxAge, preflight }?: CORSConfig) => (app: Elysia) => Elysia<import("elysia").ElysiaInstance<{
store: {};
store: Record<string, unknown>;
request: {};
schema: {};
meta: Record<typeof import("elysia").SCHEMA, {}> & Record<typeof import("elysia").DEFS, {}> & Record<typeof import("elysia").EXPOSED, {}>;
}>>;
export default cors;
{
"name": "@elysiajs/cors",
"version": "0.3.0-beta.0",
"version": "0.3.0",
"description": "Plugin for Elysia that for Cross Origin Requests (CORs)",

@@ -37,3 +37,3 @@ "author": {

"bun-types": "^0.5.7",
"elysia": "^0.3.0-beta.2",
"elysia": "^0.3.0",
"eslint": "^8.26.0",

@@ -44,4 +44,4 @@ "rimraf": "^3.0.2",

"peerDependencies": {
"elysia": ">= 0.3.0-beta.2"
"elysia": ">= 0.3.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc