Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@elysiajs/cors

Package Overview
Dependencies
Maintainers
0
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 1.1.0-rc.0 to 1.1.0-rc.1

.github/dependabot.yml

9

dist/cjs/index.js

@@ -121,15 +121,14 @@ "use strict";

app.headers(defaultHeaders);
function handleOption({ set, request }) {
function handleOption({ set, request, headers }) {
handleOrigin(set, request);
handleMethod(set, request.headers.get("access-control-request-method"));
if (allowedHeaders === true || exposeHeaders === true) {
const headers = processHeaders(request.headers);
if (allowedHeaders === true)
set.headers["access-control-allow-headers"] = headers;
set.headers["access-control-allow-headers"] = headers["access-control-request-headers"];
if (exposeHeaders === true)
set.headers["access-control-expose-headers"] = headers;
set.headers["access-control-expose-headers"] = Object.keys(headers).join(",");
}
if (maxAge) set.headers["access-control-max-age"] = maxAge.toString();
return new Response(null, {
status: 200
status: 204
});

@@ -136,0 +135,0 @@ }

{
"name": "@elysiajs/cors",
"version": "1.1.0-rc.0",
"description": "Plugin for Elysia that for Cross Origin Requests (CORs)",
"author": {
"name": "saltyAom",
"url": "https://github.com/SaltyAom",
"email": "saltyaom@gmail.com"
},
"repository": {
"type": "git",
"url": "https://github.com/elysiajs/elysia-cors"
},
"main": "./dist/cjs/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/cjs/index.js"
}
},
"homepage": "https://github.com/elysiajs/elysia-cors",
"keywords": [
"elysia",
"cors"
],
"license": "MIT",
"scripts": {
"dev": "bun run --watch example/index.ts",
"test": "bun test && npm run test:node",
"test:node": "npm install --prefix ./test/node/cjs/ && npm install --prefix ./test/node/esm/ && node ./test/node/cjs/index.js && node ./test/node/esm/index.js",
"build": "bun build.ts",
"release": "npm run build && npm run test && npm publish --access public"
},
"devDependencies": {
"@types/bun": "1.1.6",
"elysia": ">= 1.1.0-rc.2",
"eslint": "9.6.0",
"tsup": "^8.1.0",
"typescript": "^5.5.3"
},
"peerDependencies": {
"elysia": ">= 1.1.0-rc.2"
}
}
"name": "@elysiajs/cors",
"version": "1.1.0-rc.1",
"description": "Plugin for Elysia that for Cross Origin Requests (CORs)",
"author": {
"name": "saltyAom",
"url": "https://github.com/SaltyAom",
"email": "saltyaom@gmail.com"
},
"repository": {
"type": "git",
"url": "https://github.com/elysiajs/elysia-cors"
},
"main": "./dist/cjs/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/cjs/index.js"
}
},
"homepage": "https://github.com/elysiajs/elysia-cors",
"keywords": [
"elysia",
"cors"
],
"license": "MIT",
"scripts": {
"dev": "bun run --watch example/index.ts",
"test": "bun test && npm run test:node",
"test:node": "npm install --prefix ./test/node/cjs/ && npm install --prefix ./test/node/esm/ && node ./test/node/cjs/index.js && node ./test/node/esm/index.js",
"build": "bun build.ts",
"release": "npm run build && npm run test && npm publish --access public"
},
"devDependencies": {
"@types/bun": "^1.1.6",
"@types/node": "^20.14.10",
"elysia": "1.1.0-rc.6",
"eslint": "^8.26.0",
"typescript": "^5.5.2"
},
"peerDependencies": {
"elysia": ">= 1.1.0-rc.6"
}
}

Sorry, the diff of this file is not supported yet

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