0

Given the YAML fragment

spring:
  cloud:
    gateway:
      globalcors:
        cors-configurations:
          '[/**]':
            allowedOrigins: "*"

How do I use @Value("${spring.cloud.gateway.globalcors.cors-configurations.???.allowedOrigins")

Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265

1 Answers1

0

Try this

spring.cloud.gateway.globalcors.cors-configurations.'[/**]'.allowed-origins=*
spring.cloud.gateway.globalcors.cors-configurations.'[/**]'.allowed-methods=HEAD,OPTIONS,GET,POST,PUT,PATCH
spring.cloud.gateway.globalcors.cors-configurations.'[/**]'.allowed-headers=*

Tugino
  • 11
  • 2