mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: updated SecurityConfig precedence and OPTIONS method
parent
f8032b7b10
commit
d330a8ef72
|
|
@ -74,8 +74,8 @@ public class SecurityConfig {
|
||||||
*/
|
*/
|
||||||
protected void configureAuthorization(HttpSecurity http) throws Exception {
|
protected void configureAuthorization(HttpSecurity http) throws Exception {
|
||||||
http.authorizeHttpRequests(auth -> {
|
http.authorizeHttpRequests(auth -> {
|
||||||
configurePublicEndpoints(auth);
|
|
||||||
configureProtectedEndpoints(auth);
|
configureProtectedEndpoints(auth);
|
||||||
|
configurePublicEndpoints(auth);
|
||||||
configureWebSocketEndpoints(auth);
|
configureWebSocketEndpoints(auth);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -94,6 +94,9 @@ public class SecurityConfig {
|
||||||
} else {
|
} else {
|
||||||
auth.requestMatchers(HttpMethod.GET, RequestMappings.RECORDINGS + "/**").hasRole("ADMIN");
|
auth.requestMatchers(HttpMethod.GET, RequestMappings.RECORDINGS + "/**").hasRole("ADMIN");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Allow CORS preflight requests
|
||||||
|
auth.requestMatchers(HttpMethod.OPTIONS, "/**").permitAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue