Skip to content

Commit eee29c6

Browse files
committed
Update Deploy
1 parent 2632909 commit eee29c6

File tree

14 files changed

+61
-46
lines changed

14 files changed

+61
-46
lines changed

ai-service/src/main/java/com/codecampus/ai/config/SecurityConfig.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,12 @@ public CorsConfigurationSource corsConfigurationSource() {
109109

110110
// Cho phép các origin truy cập định nghĩa sẵn
111111
configuration.setAllowedOriginPatterns(List.of(
112-
"http://3.27.221.69:*", // mọi port HTTP của 3.27.221.69
113-
"https://3.27.221.69:*", // nếu có HTTPS
112+
"http://codecampus.site:*", // mọi port HTTP của codecampus.site
113+
"https://codecampus.site:*", // nếu có HTTPS
114114
"http://192.168.1.30:4200",
115-
"http://localhost:4200"
115+
"http://localhost:4200",
116+
"http://www.codecampus.site",
117+
"https://www.codecampus.site"
116118
));
117119

118120
// Cho phép các phương thức HTTP được định nghĩa

ai-service/src/main/java/com/codecampus/ai/constant/config/SecurityConfigConstant.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ public class SecurityConfigConstant {
2424
// FRONTEND ENDPOINT
2525
public static final String FRONTEND_ENDPOINT = "http://192.168.1.30:4200";
2626
public static final String FRONTEND_ENDPOINT2 = "http://localhost:4200";
27-
public static final String FRONTEND_ENDPOINT3 = "http://3.27.221.69";
2827

2928
// METHOD ALLOWED
3029
public static String GET_METHOD = "GET";

chat-service/src/main/java/com/codecampus/chat/configuration/config/SecurityConfig.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,12 @@ public CorsConfigurationSource corsConfigurationSource() {
109109

110110
// Cho phép các origin truy cập định nghĩa sẵn
111111
configuration.setAllowedOriginPatterns(List.of(
112-
"http://3.27.221.69:*", // mọi port HTTP của 3.27.221.69
113-
"https://3.27.221.69:*", // nếu có HTTPS
112+
"http://codecampus.site:*", // mọi port HTTP của codecampus.site
113+
"https://codecampus.site:*", // nếu có HTTPS
114114
"http://192.168.1.30:4200",
115-
"http://localhost:4200"
115+
"http://localhost:4200",
116+
"http://www.codecampus.site",
117+
"https://www.codecampus.site"
116118
));
117119

118120
// Cho phép các phương thức HTTP được định nghĩa

coding-service/src/main/java/com/codecampus/coding/config/SecurityConfig.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,12 @@ public CorsConfigurationSource corsConfigurationSource() {
109109

110110
// Cho phép các origin truy cập định nghĩa sẵn
111111
configuration.setAllowedOriginPatterns(List.of(
112-
"http://3.27.221.69:*", // mọi port HTTP của 3.27.221.69
113-
"https://3.27.221.69:*", // nếu có HTTPS
112+
"http://codecampus.site:*", // mọi port HTTP của codecampus.site
113+
"https://codecampus.site:*", // nếu có HTTPS
114114
"http://192.168.1.30:4200",
115-
"http://localhost:4200"
115+
"http://localhost:4200",
116+
"http://www.codecampus.site",
117+
"https://www.codecampus.site"
116118
));
117119

118120
// Cho phép các phương thức HTTP được định nghĩa

docker-compose.prod-services.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,7 @@ services:
205205
environment:
206206
- SPRING_PROFILES_ACTIVE=docker
207207
- APP_API_PREFIX=/api/v1
208-
- CORS_ALLOWED_ORIGINS=http://3.27.221.69, https://3.27.221.69
209-
# - CORS_ALLOWED_ORIGINS=http://localhost
208+
- CORS_ALLOWED_ORIGINS=http://codecampus.site, https://codecampus.site, http://www.codecampus.site, https://www.codecampus.site
210209
ports: [ "8888:8888" ]
211210
depends_on:
212211
- identity-service
@@ -220,13 +219,6 @@ services:
220219
- chat-service
221220
networks: [ backend ]
222221

223-
frontend:
224-
image: ${DOCKERHUB_USER}/codecampus-frontend:${IMAGE_TAG:-latest}
225-
restart: unless-stopped
226-
ports: [ "4200:80" ]
227-
networks: [ backend ]
228-
229-
230222
########################
231223
# NETWORK & VOLUME #
232224
########################

identity-service/src/main/java/com/codecampus/identity/configuration/config/SecurityConfig.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,12 @@ public CorsConfigurationSource corsConfigurationSource() {
9797

9898
// Cho phép các origin truy cập định nghĩa sẵn
9999
configuration.setAllowedOriginPatterns(List.of(
100-
"http://3.27.221.69:*", // mọi port HTTP của 3.27.221.69
101-
"https://3.27.221.69:*", // nếu có HTTPS
100+
"http://codecampus.site:*", // mọi port HTTP của codecampus.site
101+
"https://codecampus.site:*", // nếu có HTTPS
102102
"http://192.168.1.30:4200",
103-
"http://localhost:4200"
103+
"http://localhost:4200",
104+
"http://www.codecampus.site",
105+
"https://www.codecampus.site"
104106
));
105107

106108
// Cho phép các phương thức HTTP được định nghĩa

notification-service/src/main/java/com/codecampus/notification/configuration/config/SecurityConfig.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,12 @@ public CorsConfigurationSource corsConfigurationSource() {
109109

110110
// Cho phép các origin truy cập định nghĩa sẵn
111111
configuration.setAllowedOriginPatterns(List.of(
112-
"http://3.27.221.69:*", // mọi port HTTP của 3.27.221.69
113-
"https://3.27.221.69:*", // nếu có HTTPS
112+
"http://codecampus.site:*", // mọi port HTTP của codecampus.site
113+
"https://codecampus.site:*", // nếu có HTTPS
114114
"http://192.168.1.30:4200",
115-
"http://localhost:4200"
115+
"http://localhost:4200",
116+
"http://www.codecampus.site",
117+
"https://www.codecampus.site"
116118
));
117119

118120
// Cho phép các phương thức HTTP được định nghĩa

org-service/src/main/java/com/codecampus/organization/configuration/config/SecurityConfig.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,12 @@ public CorsConfigurationSource corsConfigurationSource() {
9797

9898
// Cho phép các origin truy cập định nghĩa sẵn
9999
configuration.setAllowedOriginPatterns(List.of(
100-
"http://3.27.221.69:*", // mọi port HTTP của 3.27.221.69
101-
"https://3.27.221.69:*", // nếu có HTTPS
100+
"http://codecampus.site:*", // mọi port HTTP của codecampus.site
101+
"https://codecampus.site:*", // nếu có HTTPS
102102
"http://192.168.1.30:4200",
103-
"http://localhost:4200"
103+
"http://localhost:4200",
104+
"http://www.codecampus.site",
105+
"https://www.codecampus.site"
104106
));
105107

106108
// Cho phép các phương thức HTTP được định nghĩa

payment-service/src/main/java/com/codecampus/payment/config/SecurityConfig.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,12 @@ public CorsConfigurationSource corsConfigurationSource() {
109109

110110
// Cho phép các origin truy cập định nghĩa sẵn
111111
configuration.setAllowedOriginPatterns(List.of(
112-
"http://3.27.221.69:*", // mọi port HTTP của 3.27.221.69
113-
"https://3.27.221.69:*", // nếu có HTTPS
112+
"http://codecampus.site:*", // mọi port HTTP của codecampus.site
113+
"https://codecampus.site:*", // nếu có HTTPS
114114
"http://192.168.1.30:4200",
115-
"http://localhost:4200"
115+
"http://localhost:4200",
116+
"http://www.codecampus.site",
117+
"https://www.codecampus.site"
116118
));
117119

118120
// Cho phép các phương thức HTTP được định nghĩa

post-service/src/main/java/com/codecampus/post/config/SecurityConfig.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,12 @@ public CorsConfigurationSource corsConfigurationSource() {
109109

110110
// Cho phép các origin truy cập định nghĩa sẵn
111111
configuration.setAllowedOriginPatterns(List.of(
112-
"http://3.27.221.69:*", // mọi port HTTP của 3.27.221.69
113-
"https://3.27.221.69:*", // nếu có HTTPS
112+
"http://codecampus.site:*", // mọi port HTTP của codecampus.site
113+
"https://codecampus.site:*", // nếu có HTTPS
114114
"http://192.168.1.30:4200",
115-
"http://localhost:4200"
115+
"http://localhost:4200",
116+
"http://www.codecampus.site",
117+
"https://www.codecampus.site"
116118
));
117119

118120
// Cho phép các phương thức HTTP được định nghĩa

0 commit comments

Comments
 (0)