@tinyhttp/cors
Advanced tools
Comparing version 0.1.23 to 0.1.24
@@ -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": { |
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
4963