More strictly defined authenticated routes.

This commit is contained in:
neviyn 2018-10-08 11:44:05 +01:00
parent 65070275a3
commit 9e198fdaa5

View File

@ -38,7 +38,7 @@ class CustomWebSecurityConfigurerAdapter : WebSecurityConfigurerAdapter() {
@Throws(Exception::class) @Throws(Exception::class)
override fun configure(http: HttpSecurity) { override fun configure(http: HttpSecurity) {
http.csrf().disable().authorizeRequests() http.csrf().disable().authorizeRequests()
.antMatchers(HttpMethod.POST, "/api/**").authenticated() .antMatchers(HttpMethod.POST, "/api/site", "/api/tutor", "/api/observation").authenticated()
.anyRequest().permitAll() .anyRequest().permitAll()
.and() .and()
.httpBasic() .httpBasic()