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

@tinyhttp/cors

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinyhttp/cors - npm Package Compare versions

Comparing version 0.1.23 to 0.1.24

dist/index.cjs.js

2

dist/index.js

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e=["GET","POST","PUT","PATCH","HEAD"],t=["Origin","X-Requested-With","Content-Type"];exports.cors=({host:s="*",methods:o=e,headers:r=t})=>{const d="Access-Control-Allow";return(e,t,n)=>{t.setHeader(d+"-Origin",s),t.setHeader(d+"-Headers",r.join(", ")),t.setHeader(d+"-Methods",o.join(", ")),null==n||n()}},exports.defaultHeaders=t,exports.defaultMethods=e;
const e=["GET","POST","PUT","PATCH","HEAD"],t=["Origin","X-Requested-With","Content-Type"],s=({host:s="*",methods:o=e,headers:n=t})=>{const r="Access-Control-Allow";return(e,t,d)=>{t.setHeader(r+"-Origin",s),t.setHeader(r+"-Headers",n.join(", ")),t.setHeader(r+"-Methods",o.join(", ")),null==d||d()}};export{s as cors,t as defaultHeaders,e as defaultMethods};
{
"name": "@tinyhttp/cors",
"version": "0.1.23",
"version": "0.1.24",
"description": "tinyhttp CORS module",
"main": "dist/index.js",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts",
"module": "dist/index.esm.js",
"module": "dist/index.js",
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs.js"
},
"./package.json": "./package.json",
"./": "./"
},
"homepage": "https://github.com/talentlessguy/tinyhttp",

@@ -9,0 +17,0 @@ "repository": {

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