spring-cloud-gateway icon indicating copy to clipboard operation
spring-cloud-gateway copied to clipboard

The corsConfigurations might not works.

Open unsciorg opened this issue 7 years ago • 5 comments

Spring Cloud version: Greenwich.RELEASE

Hello, I add the globalcors.corsConfigurations in applicaion.yml as follows.


spring:
  cloud:
    gateway:
      ...
      globalcors:
        corsConfigurations:
          '[/**]':
            allowedOrigins: "*"
            allowedMethods:
              - GET
              - POST
              - DELETE
              - HEAD
              - OPTIONS
              - LOCK
              - UNLOCK
              - PUT
              - PATCH
              - LINK
              - UNLINK
              - PROPFIND
              - VIEW

but when the explorer make a request in 172.16.126.246:8080, the server response status is 403.

Request URL: http://172.16.124.196:8083/login
Request Method: OPTIONS
Status Code: 403 Forbidden

unsciorg avatar Jun 25 '19 08:06 unsciorg

The port is different than configured

spencergibb avatar Jun 25 '19 09:06 spencergibb

Sorry, my profile is pasted incorrectly. The profile is

allowedOrigins: "*"

actually.

unsciorg avatar Jun 25 '19 09:06 unsciorg

Can you provide a complete, minimal, verifiable sample that reproduces the problem? It should be available as a GitHub (or similar) project or attached to this issue as a zip file.

ryanjbaxter avatar Jun 25 '19 19:06 ryanjbaxter

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

spring-projects-issues avatar Jul 02 '19 19:07 spring-projects-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

spring-projects-issues avatar Jul 09 '19 19:07 spring-projects-issues