@@ -10,7 +10,7 @@ import { dependencies } from "../__boot/dependencies";
1010import { routes } from "../infrastructure/routes" ;
1111import { errorHandler } from "../_lib/common/error" ;
1212// import { multerError } from "../_lib/common/error/multerError";
13- // import cors from "cors";
13+ import cors from "cors" ;
1414const app :Application = express ( ) ;
1515
1616app . use ( express . json ( ) )
@@ -30,13 +30,13 @@ if(process.env.NODE_ENV === "development"){
3030// }));
3131
3232
33- // app.use(cors({
34- // origin: 'https://v-learning-client-5r8j.vercel.app',
35- // methods: ["GET", "POST", "HEAD", "PUT", "PATCH", "DELETE", "OPTIONS"],
36- // credentials: true,
37- // allowedHeaders: ['Content-Type', 'Authorization', 'Cookie', 'Range', 'Accept'],
38- // exposedHeaders: ['Content-Disposition', 'Content-Range', 'Accept-Ranges', 'Content-Length', 'Content-Type']
39- // }));
33+ app . use ( cors ( {
34+ origin : 'https://v-learning-client-5r8j.vercel.app' ,
35+ methods : [ "GET" , "POST" , "HEAD" , "PUT" , "PATCH" , "DELETE" , "OPTIONS" ] ,
36+ credentials : true ,
37+ allowedHeaders : [ 'Content-Type' , 'Authorization' , 'Cookie' , 'Range' , 'Accept' ] ,
38+ exposedHeaders : [ 'Content-Disposition' , 'Content-Range' , 'Accept-Ranges' , 'Content-Length' , 'Content-Type' ]
39+ } ) ) ;
4040
4141app . use ( '/' , routes ( dependencies ) ) ;
4242
0 commit comments