孙永军 1 년 전
부모
커밋
1ff161aba2
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/main/java/com/sxtvs/open/api/review/controller/SseController.java

+ 1 - 1
src/main/java/com/sxtvs/open/api/review/controller/SseController.java

@@ -33,7 +33,7 @@ public class SseController {
     @Autowired
     private ThreadPoolExecutor poolExecutor;
 
-    @GetMapping(path = "/sse", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
+    @GetMapping(path = "/sse", produces = MediaType.TEXT_EVENT_STREAM_VALUE, headers = "Cache-Control=no-cache")
     @NoAPIResponse
     public SseEmitter handleSse(@RequestParam("token") String token) throws IOException {
         SseEmitter sseEmitter = new SseEmitter(300 * 1000L); // 设置超时时间