Refactor metamigo-common
This commit is contained in:
parent
cae0071851
commit
b3d8c3918e
32 changed files with 5 additions and 14 deletions
|
|
@ -1,32 +0,0 @@
|
|||
import { ConvictSchema } from "./types";
|
||||
|
||||
export interface ICorsConfig {
|
||||
allowedMethods: Array<string>;
|
||||
allowedOrigins: Array<string>;
|
||||
allowedHeaders: Array<string>;
|
||||
}
|
||||
|
||||
export const CorsConfig: ConvictSchema<ICorsConfig> = {
|
||||
allowedMethods: {
|
||||
doc: "The allowed CORS methods",
|
||||
format: "Array",
|
||||
env: "CORS_ALLOWED_METHODS",
|
||||
default: ["GET", "PUT", "POST", "PATCH", "DELETE", "HEAD", "OPTIONS"],
|
||||
},
|
||||
allowedOrigins: {
|
||||
doc: "The allowed origins",
|
||||
format: "Array",
|
||||
env: "CORS_ALLOWED_ORIGINS",
|
||||
default: [],
|
||||
},
|
||||
allowedHeaders: {
|
||||
doc: "The allowed headers",
|
||||
format: "Array",
|
||||
env: "CORS_ALLOWED_HEADERS",
|
||||
default: [
|
||||
"content-type",
|
||||
"authorization",
|
||||
"cf-access-authenticated-user-email",
|
||||
],
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue