spring-cloud/spring-cloud-gateway

Add CORS functionality to spring cloud gateway mvc

Open

#3,302 建立於 2024年3月17日

在 GitHub 查看
 (9 留言) (4 反應) (0 負責人)Java (4,284 star) (3,204 fork)batch import
enhancementhelp wantedin: server-webmvc

描述

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

貢獻者指南

Add CORS functionality to spring cloud gateway mvc · spring-cloud/spring-cloud-gateway#3302 | Good First Issue