formacao
This commit is contained in:
+2
-5
@@ -1,13 +1,10 @@
|
||||
// src/middleware/cors/index.ts
|
||||
var cors = (options) => {
|
||||
const defaults = {
|
||||
const opts = {
|
||||
origin: "*",
|
||||
allowMethods: ["GET", "HEAD", "PUT", "POST", "DELETE", "PATCH"],
|
||||
allowHeaders: [],
|
||||
exposeHeaders: []
|
||||
};
|
||||
const opts = {
|
||||
...defaults,
|
||||
exposeHeaders: [],
|
||||
...options
|
||||
};
|
||||
const findAllowOrigin = ((optsOrigin) => {
|
||||
|
||||
Reference in New Issue
Block a user