孙永军 преди 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); // 设置超时时间