spring-cloud/spring-cloud-gateway

Add CORS functionality to spring cloud gateway mvc

Aberta

#3.302 aberto em 17 de mar. de 2024

 (11 comentários) (4 reações) (0 responsável)Java (3.204 forks)batch import
enhancementhelp wantedin: server-webmvc

Métricas do repositório

Stars
 (4.284 estrelas)
Métricas de merge de PR
 (Mesclagem média 1d 21h) (18 fundiu PRs em 30d)

Description

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

Guia do colaborador