@@ -21,12 +21,21 @@ if(process.env.NODE_ENV === "development"){
2121 app . use ( morgan ( "dev" ) )
2222}
2323
24+ // app.use(cors({
25+ // origin: 'https://v-learning-client-5r8j.vercel.app',
26+ // credentials: true,
27+ // allowedHeaders: ['Range', 'Authorization', 'Content-Type','Accept'],
28+ // exposedHeaders: ['Content-Disposition','Content-Range', 'Accept-Ranges', 'Content-Length', 'Content-Type'],
29+ // methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS']
30+ // }));
31+
32+
2433app . use ( cors ( {
2534 origin : 'https://v-learning-client-5r8j.vercel.app' ,
35+ methods : [ "GET" , "POST" , "HEAD" , "PUT" , "PATCH" , "DELETE" , "OPTIONS" ] ,
2636 credentials : true ,
27- allowedHeaders : [ 'Range' , 'Authorization' , 'Content-Type' , 'Accept' ] ,
28- exposedHeaders : [ 'Content-Disposition' , 'Content-Range' , 'Accept-Ranges' , 'Content-Length' , 'Content-Type' ] ,
29- methods : [ 'GET' , 'POST' , 'PUT' , 'DELETE' , 'OPTIONS' ]
37+ allowedHeaders : [ 'Content-Type' , 'Authorization' , 'Cookie' , 'Range' , 'Accept' ] ,
38+ exposedHeaders : [ 'Content-Disposition' , 'Content-Range' , 'Accept-Ranges' , 'Content-Length' , 'Content-Type' ]
3039} ) ) ;
3140
3241app . use ( '/' , routes ( dependencies ) ) ;
0 commit comments