Move packages/apps back
This commit is contained in:
parent
6eaaf8e9be
commit
5535d6b575
348 changed files with 0 additions and 0 deletions
32
packages/metamigo-common/config/cors.ts
Normal file
32
packages/metamigo-common/config/cors.ts
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
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