Spring CORS Mapping with '*' wildcard not working

前端 未结 2 1521
我在风中等你
我在风中等你 2021-01-23 16:44

I have a Spring Boot Application. In the Application class I define my CORS mappings like this:

@Bean
    public WebMvcConfigurer corsConfigurer() {
        retu         


        
相关标签:
2条回答
  • 2021-01-23 17:10

    Try to use

    @CrossOrigin(origins = "")
    

    in your controller.

    0 讨论(0)
  • Try to use

    @CrossOrigin
    

    This works properly as wildcard.

    0 讨论(0)
提交回复
热议问题