@tinyhttp/cors
Advanced tools
Comparing version 1.0.0 to 1.0.1
# @tinyhttp/cors | ||
## 1.0.1 | ||
### Patch Changes | ||
- Remove license notes from readmes, add readme for type-is | ||
## 1.0.0 | ||
@@ -4,0 +10,0 @@ |
@@ -15,2 +15,2 @@ /// <reference types="node" /> | ||
*/ | ||
export declare const cors: ({ origin, methods, allowedHeaders, exposedHeaders, credentials, maxAge, optionsSuccessStatus, }: AccessControlOptions) => (req: Request, res: Response, next?: () => void) => void; | ||
export declare const cors: ({ origin, methods, allowedHeaders, exposedHeaders, credentials, maxAge, optionsSuccessStatus }: AccessControlOptions) => (req: Request, res: Response, next?: () => void) => void; |
@@ -6,3 +6,3 @@ import { vary } from 'es-vary'; | ||
*/ | ||
const cors = ({ origin = '*', methods = ['GET', 'HEAD', 'PUT', 'PATCH', 'POST', 'DELETE'], allowedHeaders, exposedHeaders, credentials, maxAge, optionsSuccessStatus = 204, }) => { | ||
const cors = ({ origin = '*', methods = ['GET', 'HEAD', 'PUT', 'PATCH', 'POST', 'DELETE'], allowedHeaders, exposedHeaders, credentials, maxAge, optionsSuccessStatus = 204 }) => { | ||
return (req, res, next) => { | ||
@@ -9,0 +9,0 @@ // Checking the type of the origin property |
{ | ||
"name": "@tinyhttp/cors", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "tinyhttp CORS module", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -67,8 +67,4 @@ # @tinyhttp/cors | ||
## License | ||
MIT © [BRA1L0R](https://brailor.me/) | ||
[badge-url]: https://img.shields.io/npm/v/@tinyhttp/cors?style=flat-square | ||
[npm-url]: https://npmjs.com/package/@tinyhttp/cors | ||
[dl-badge-url]: https://img.shields.io/npm/dt/@tinyhttp/cors?style=flat-square |
@@ -24,3 +24,3 @@ import { IncomingMessage as Request, ServerResponse as Response } from 'http' | ||
maxAge, | ||
optionsSuccessStatus = 204, | ||
optionsSuccessStatus = 204 | ||
}: AccessControlOptions) => { | ||
@@ -27,0 +27,0 @@ return (req: Request, res: Response, next?: () => void) => { |
Sorry, the diff of this file is not supported yet
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
12852
70