From 80544e43af3c23ec61ce4e3939cd3a3f619d6cdf Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 20 Feb 2021 14:50:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=89=8D=E7=AB=AF=E6=89=93?= =?UTF-8?q?=E5=8C=85=E8=84=9A=E6=9C=AC=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/.env.staging | 2 +- .../framework/security/config/SecurityConfiguration.java | 2 ++ src/main/resources/application.yaml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ruoyi-ui/.env.staging b/ruoyi-ui/.env.staging index 97026114a..1eeaa8947 100644 --- a/ruoyi-ui/.env.staging +++ b/ruoyi-ui/.env.staging @@ -4,4 +4,4 @@ NODE_ENV = production ENV = 'staging' # 芋道管理系统/测试环境 -VUE_APP_BASE_API = 'http://api.ruoyi-vue-pro.iocoder.cn/stage-api' +VUE_APP_BASE_API = 'http://api-dashboard.yudao.iocoder.cn' diff --git a/src/main/java/cn/iocoder/dashboard/framework/security/config/SecurityConfiguration.java b/src/main/java/cn/iocoder/dashboard/framework/security/config/SecurityConfiguration.java index 2898023e2..e3b8278bf 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/security/config/SecurityConfiguration.java +++ b/src/main/java/cn/iocoder/dashboard/framework/security/config/SecurityConfiguration.java @@ -114,6 +114,8 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity httpSecurity) throws Exception { httpSecurity + // 开启跨域 + .cors().and() // CSRF 禁用,因为不使用 Session .csrf().disable() // 基于 token 机制,所以不需要 Session diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 6be75132a..f11c9b889 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -3,7 +3,7 @@ spring: name: dashboard profiles: - active: dev + active: local # Servlet 配置 servlet: