23 lines
921 B
Plaintext
23 lines
921 B
Plaintext
|
|
package com.securityControl.gateway.config;
|
|||
|
|
|
|||
|
|
//import org.springframework.context.annotation.Configuration;
|
|||
|
|
//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
|||
|
|
//import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
|||
|
|
//import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
|||
|
|
//
|
|||
|
|
////@Configuration
|
|||
|
|
////@EnableWebSecurity
|
|||
|
|
//public class MyWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter {
|
|||
|
|
//
|
|||
|
|
// @Override
|
|||
|
|
// protected void configure(HttpSecurity http) throws Exception {
|
|||
|
|
// //CSRF默认支持的方法: GET|HEAD|TRACE|OPTIONS,不支持POST ,不是我们想要的,故取消CSRF防御
|
|||
|
|
// http.csrf().disable();
|
|||
|
|
// http.authorizeRequests()
|
|||
|
|
// .antMatchers("/actuator/**").denyAll()
|
|||
|
|
// .anyRequest().permitAll();
|
|||
|
|
//
|
|||
|
|
// }
|
|||
|
|
//
|
|||
|
|
//}
|