diff --git a/src/main/java/com/example/backend/notification/controller/NotificationController.java b/src/main/java/com/example/backend/notification/controller/NotificationController.java index 9a2fa75..25fc7f4 100644 --- a/src/main/java/com/example/backend/notification/controller/NotificationController.java +++ b/src/main/java/com/example/backend/notification/controller/NotificationController.java @@ -60,10 +60,6 @@ public ResponseEntity deleteNotification() { .body(notificationService.deleteNotification(LoadUser.getEmail())); } - @CrossOrigin(value = { "*" }, - allowedHeaders = { "*" }, - maxAge = 900 - ) @GetMapping("/subscribe/{id}") public SseEmitter subscribe(@RequestHeader(value = "Last-Event-ID", required = false, defaultValue = "") String lastEventId, @PathVariable Long id ) { diff --git a/src/main/java/com/example/backend/notification/service/EmitterService.java b/src/main/java/com/example/backend/notification/service/EmitterService.java index e092c65..2e754ba 100644 --- a/src/main/java/com/example/backend/notification/service/EmitterService.java +++ b/src/main/java/com/example/backend/notification/service/EmitterService.java @@ -10,7 +10,7 @@ public class EmitterService { private final EmitterRepository emitterRepository; - private static final Long DEFAULT_TIMEOUT = 60L * 1000 * 60; + private static final Long DEFAULT_TIMEOUT = 60L * 1000 * 60 * 24; public SseEmitter createEmitter(Long id) { SseEmitter emitter = new SseEmitter(DEFAULT_TIMEOUT);