跨域配置

spring:
  cloud:
    gateway:
      globalcors:
        corsConfigurations:
          '[/**]':
            # 允许携带认证信息
            allowCredentials: true
            # 允许跨域的源(网站域名/ip),设置*为全部
            allowedOriginPatterns: "*"
            # 允许跨域的method, 默认为GET和OPTIONS,设置*为全部
            allowedMethods: "*"
            # 允许跨域请求里的head字段,设置*为全部
            allowedHeaders: "*"
      default-filters:
        - DedupeResponseHeader=Access-Control-Allow-Origin, RETAIN_UNIQUE
Copyright © wueasy.com 2017-2021 all right reserved,powered by Gitbook未经允许,禁止以任何形式传播 修订时间: 2021-05-23

results matching ""

    No results matching ""