@elysiajs/cors
Advanced tools
Comparing version 0.3.0-beta.0 to 0.3.0
/// <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" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19718
396