Skip to content

Commit 488e8cb

Browse files
committed
allow all domain
1 parent 57ce4b5 commit 488e8cb

8 files changed

Lines changed: 20 additions & 11 deletions

File tree

api-gateway/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:18
1+
FROM node:20
22
WORKDIR /app
33

44
# Copy package files and install all dependencies (including dev dependencies)

api-gateway/src/middleware/security.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const applySecurityMiddleware = (app: Application) => {
1919
console.log('Setting up CORS with client URL:', Service.CLIENT_URL);
2020

2121
app.use(cors({
22-
origin: [Service.CLIENT_URL],
22+
origin: "*",
2323
methods: ["GET", "POST", "HEAD", "PUT", "PATCH", "DELETE", "OPTIONS"],
2424
credentials: true,
2525
allowedHeaders: ['Content-Type', 'Authorization', 'Cookie', 'Range', 'Accept'],

auth-service/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:18
1+
FROM node:20
22
WORKDIR /app
33

44
# Copy package files and install all dependencies (including dev dependencies)

auth-service/src/presentation/server.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,23 @@ if(process.env.NODE_ENV === "development"){
3030
// }));
3131

3232

33-
app.use(cors({
34-
origin: 'https://v-learning-client-5r8j.vercel.app',
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+
// }));
40+
41+
const corsOptions = {
42+
origin: '*' ,
3543
methods: ["GET", "POST", "HEAD", "PUT", "PATCH", "DELETE", "OPTIONS"],
3644
credentials: true,
3745
allowedHeaders: ['Content-Type', 'Authorization', 'Cookie', 'Range', 'Accept'],
3846
exposedHeaders: ['Content-Disposition', 'Content-Range', 'Accept-Ranges', 'Content-Length', 'Content-Type']
39-
}));
47+
};
48+
49+
app.use(cors(corsOptions));
4050

4151
app.use('/',routes(dependencies));
4252

chat-service/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Development stage Dockerfile for chat-service
2-
FROM node:18
2+
FROM node:20
33

44
# Set working directory
55
WORKDIR /app

course-srv/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Development stage Dockerfile for payment-srv
2-
FROM node:18
2+
FROM node:20
33

44
# Set working directory
55
WORKDIR /app

notification-service/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
# Development stage Dockerfile for notification-service
3-
FROM node:18
3+
FROM node:20
44

55
# Set working directory
66
WORKDIR /app

payment-srv/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Development stage Dockerfile for payment-srv
2-
FROM node:18
3-
2+
FROM node:20
43
# Set working directory
54
WORKDIR /app
65

0 commit comments

Comments
 (0)