spring-cloud/spring-cloud-gateway

Add CORS functionality to spring cloud gateway mvc

开放

#3,302 创建于 2024年3月17日

 (12 条评论) (4 个反应) (0 位负责人)Java (3,204 个派生)batch import
enhancementhelp wantedin: server-webmvc

仓库指标

星标
 (4,284 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

I required cross origin functionality in spring gateway mvc but I am not able to use it E.g This metadata is not present in spring gateway mvc.

spring:
  cloud:
    gateway:
      routes:
      - id: cors_route
        uri: https://example.org
        predicates:
        - Path=/service/**
        metadata:
          cors
            allowedOrigins: '*'
            allowedMethods:
              - GET
              - POST
            allowedHeaders: '*'
            maxAge: 30

贡献者指南