From e897932e8f543d1ba93ee976bf295098bdf1af22 Mon Sep 17 00:00:00 2001 From: zhizhi wu <2377881365@qq.com> Date: Wed, 28 Apr 2021 19:06:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=A8=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application-dev.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index c11642e..c17ba82 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -29,6 +29,22 @@ spring: name: gateway cloud: gateway: + globalcors: + cors-configurations: + '[/**]': + # 允许携带认证信息 + # 允许跨域的源(网站域名/ip),设置*为全部 + # 允许跨域请求里的head字段,设置*为全部 + # 允许跨域的method, 默认为GET和OPTIONS,设置*为全部 + # 跨域允许的有效期 + allow-credentials: true + allowed-origins: "*" + allowed-headers: "*" + allowed-methods: + - OPTIONS + - GET + - POST + max-age: 3600 routes: - id: ht-service uri: lb://ht