openvidu-server: updated SecurityConfig precedence and OPTIONS method

v2
pabloFuente 2025-11-03 13:47:19 +01:00
parent f8032b7b10
commit d330a8ef72
1 changed files with 4 additions and 1 deletions

View File

@ -74,8 +74,8 @@ public class SecurityConfig {
*/
protected void configureAuthorization(HttpSecurity http) throws Exception {
http.authorizeHttpRequests(auth -> {
configurePublicEndpoints(auth);
configureProtectedEndpoints(auth);
configurePublicEndpoints(auth);
configureWebSocketEndpoints(auth);
});
}
@ -94,6 +94,9 @@ public class SecurityConfig {
} else {
auth.requestMatchers(HttpMethod.GET, RequestMappings.RECORDINGS + "/**").hasRole("ADMIN");
}
// Allow CORS preflight requests
auth.requestMatchers(HttpMethod.OPTIONS, "/**").permitAll();
}
/**