We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 82b2c1c commit cd641b0Copy full SHA for cd641b0
service/src/main/java/com/ericsson/eiffel/remrem/generate/config/DisabledSecurityConfig.java
@@ -34,6 +34,17 @@
34
public class DisabledSecurityConfig extends WebSecurityConfigurerAdapter {
35
@Override
36
protected void configure(HttpSecurity http) throws Exception {
37
- http.authorizeRequests().anyRequest().permitAll().and().csrf().disable();
+ http.authorizeRequests()
38
+ .anyRequest()
39
+ .permitAll()
40
+ .and()
41
+ .csrf()
42
+ // The application uses non-browser clients. Yes, there is swagger interface,
43
+ // but is's used only for testing/tuning.
44
+ //
45
+ // From https://docs.spring.io/spring-security/reference/features/exploits/csrf.html
46
+ // "If you are creating a service that is used only by non-browser clients,
47
+ // you likely want to disable CSRF protection."
48
+ .disable();
49
}
50
0 commit comments