mirror of
https://github.com/Febbweiss/springboot-react-webpack.git
synced 2026-03-04 14:15:36 +00:00
Security policy
This commit is contained in:
@@ -2,7 +2,9 @@ package com.opengroupe.cloud.saas;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.security.oauth2.client.EnableOAuth2Sso;
|
||||
|
||||
//@EnableOAuth2Sso
|
||||
@SpringBootApplication
|
||||
public class Application {
|
||||
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
package com.opengroupe.cloud.saas.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.HttpMethod;
|
||||
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 WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http.authorizeRequests().anyRequest().permitAll();
|
||||
http.csrf().disable()
|
||||
.authorizeRequests()
|
||||
.antMatchers(HttpMethod.GET, "/**").anonymous()
|
||||
.antMatchers(HttpMethod.POST, "/api/**").anonymous()
|
||||
.anyRequest().permitAll();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user