孙永军 1 an în urmă
părinte
comite
1ff161aba2

+ 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); // 设置超时时间