CORS allowed-origin restrictions aren’t causing the server to reject requests

后端 未结 3 464
天命终不由人
天命终不由人 2020-11-27 08:43

I am using Spring Boot v1.5.1, and it seems my restriction on CORS origin is not working.

My application.properties file has the following line (ref1 ref2).

3条回答
  •  感情败类
    2020-11-27 09:05

    Explicitly specifying the domain as string in @CrossOrigin("http://mydomain.io") will work. I dont' think this will work @CrossOrigin("${endpoints.cors.allowed-origins}").

提交回复
热议问题