spring-cloud/spring-cloud-gateway

Add CORS functionality to spring cloud gateway mvc

Open

#3302 aperta il 17 mar 2024

Vedi su GitHub
 (9 commenti) (4 reazioni) (0 assegnatari)Java (3204 fork)batch import
enhancementhelp wantedin: server-webmvc

Metriche repository

Star
 (4284 star)
Metriche merge PR
 (Merge medio 1g 21h) (18 PR mergiate in 30 g)

Descrizione

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

Guida contributor