Update CommandsToServerController route and adjust security config to permit access to the new route

This commit is contained in:
akastijn 2026-08-02 17:16:59 +02:00
parent b71a2f19b8
commit 4f67228c39
2 changed files with 2 additions and 4 deletions

View File

@ -71,6 +71,7 @@ public class SecurityConfig {
.requestMatchers("/api/files/download/**").hasAuthority(PermissionClaimDto.HEAD_MOD.getValue()) .requestMatchers("/api/files/download/**").hasAuthority(PermissionClaimDto.HEAD_MOD.getValue())
.requestMatchers("/api/history/admin/**").hasAuthority(PermissionClaimDto.HEAD_MOD.getValue()) .requestMatchers("/api/history/admin/**").hasAuthority(PermissionClaimDto.HEAD_MOD.getValue())
.requestMatchers("/api/login/userLogin/**").permitAll() .requestMatchers("/api/login/userLogin/**").permitAll()
.requestMatchers("/api/chat/server/send/**").permitAll()
.anyRequest().permitAll() .anyRequest().permitAll()
) )
.csrf(AbstractHttpConfigurer::disable) .csrf(AbstractHttpConfigurer::disable)

View File

@ -16,13 +16,10 @@ import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.server.ResponseStatusException; import org.springframework.web.server.ResponseStatusException;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
import java.time.Duration;
import java.time.Instant;
@RequiredArgsConstructor @RequiredArgsConstructor
@Slf4j @Slf4j
@RestController @RestController
@RequestMapping("/api/chat/send") @RequestMapping("/api/chat/server/send")
public class CommandsToServerController { public class CommandsToServerController {
private final ServerMessageService serverMessageService; private final ServerMessageService serverMessageService;