Standalone Spring OAuth2 JWT Authorization Server + CORS

前端 未结 6 1324
长发绾君心
长发绾君心 2020-11-28 04:01

So I have the following Authorization Server condensed from this example from Dave Syer

@SpringBootApplication
publi         


        
6条回答
  •  Happy的楠姐
    2020-11-28 04:20

    I found a solution using the solution for the question. But I have another way to describe the solution:

    @Configuration
    public class WebSecurityGlobalConfig extends WebSecurityConfigurerAdapter {
          ....
          @Override
          public void configure(WebSecurity web) throws Exception {
            web.ignoring()
              .antMatchers(HttpMethod.OPTIONS);
          }
          ...
    }
    

提交回复
热议问题