diff --git a/.env.example b/.env.example index b89b03aff..e69054378 100644 --- a/.env.example +++ b/.env.example @@ -80,8 +80,8 @@ WEBPUSH_PRIVATE_KEY= LOG_LEVEL=INFO # === Frontend (Nuxt) === -NUXT_PUBLIC_API_BASE_URL=http://springboot:8080 -NUXT_PUBLIC_API_BASE_URL_SSR=http://localhost:8080 +NUXT_PUBLIC_API_BASE_URL=http://localhost:8080 +NUXT_PUBLIC_API_BASE_URL_SSR=http://springboot:8080 NUXT_PUBLIC_WEBSOCKET_URL=http://websocket_service:8082 NUXT_PUBLIC_WEBSITE_BASE_URL=http://localhost:3000 # 线上 & 本地均可使用 diff --git a/websocket_service/src/main/java/com/openisle/websocket/security/SecurityConfig.java b/websocket_service/src/main/java/com/openisle/websocket/security/SecurityConfig.java index 6d6da7faa..a0083ea6f 100644 --- a/websocket_service/src/main/java/com/openisle/websocket/security/SecurityConfig.java +++ b/websocket_service/src/main/java/com/openisle/websocket/security/SecurityConfig.java @@ -37,14 +37,14 @@ public class SecurityConfig { "http://localhost:8081", "http://localhost:8082", "http://localhost:3000", - "http://frontend_dev:3000", - "http://frontend_service:3000", "http://localhost:3001", "http://localhost", "http://30.211.97.238:3000", "http://30.211.97.238", "http://192.168.7.98", "http://192.168.7.98:3000", + "http://frontend_dev:3000", + "http://frontend_service:3000", websiteUrl, websiteUrl.replace("://www.", "://") ));