spring-cloud/spring-cloud-gateway

Add CORS functionality to spring cloud gateway mvc

Open

#3 302 ouverte le 17 mars 2024

Voir sur GitHub
 (9 commentaires) (4 réactions) (0 assignés)Java (3 204 forks)batch import
enhancementhelp wantedin: server-webmvc

Métriques du dépôt

Stars
 (4 284 stars)
Métriques de merge PR
 (Merge moyen 1j 21h) (18 PRs mergées en 30 j)

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

Guide contributeur