11import express , { Application , Request , Response } from "express" ;
22import cookieParser from "cookie-parser" ;
33import { config } from 'dotenv' ;
4- import bodyParser from "body-parser" ;
5- import helmet from 'helmet' ;
4+ // import bodyParser from "body-parser";
5+ // import helmet from 'helmet';
66
77
88config ( ) ;
99
1010import { errorHandler } from "../_lib/error" ;
1111import { routes } from "../infrastructure/routes" ;
1212import { dependencies } from "../__boot/dependencies" ;
13- import cors from 'cors' ;
13+ // import cors from 'cors';
1414
1515
1616const app : Application = express ( ) ;
@@ -31,19 +31,19 @@ app.use(cookieParser());
3131// }));
3232
3333
34- app . use ( cors ( {
35- origin : 'https://v-learning-client-5r8j.vercel.app' ,
36- credentials : true ,
37- allowedHeaders : [ 'Authorization' , 'Content-Type' , 'Range' , 'Accept' ] ,
38- exposedHeaders : [ 'Content-Disposition' , 'Content-Range' , 'Accept-Ranges' , 'Content-Length' , 'Content-Type' ] ,
39- methods : [ 'GET' , 'POST' , 'PUT' , 'DELETE' , 'OPTIONS' ]
40- } ) ) ;
34+ // app.use(cors({
35+ // origin: 'https://v-learning-client-5r8j.vercel.app',
36+ // credentials: true,
37+ // allowedHeaders: ['Authorization', 'Content-Type', 'Range', 'Accept'],
38+ // exposedHeaders: ['Content-Disposition', 'Content-Range', 'Accept-Ranges', 'Content-Length', 'Content-Type'],
39+ // methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS']
40+ // }));
4141
4242
4343// Add helmet with CORP configuration
44- app . use ( helmet ( {
45- crossOriginResourcePolicy : { policy : "cross-origin" }
46- } ) ) ;
44+ // app.use(helmet({
45+ // crossOriginResourcePolicy: { policy: "cross-origin" }
46+ // }));
4747
4848app . get ( "/" , ( req :Request , res :Response ) => {
4949 res . status ( 200 ) . json ( {
0 commit comments