aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/juick/www/api/Service.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/juick/www/api/Service.java b/src/main/java/com/juick/www/api/Service.java
index 310f1285..ed6699d2 100644
--- a/src/main/java/com/juick/www/api/Service.java
+++ b/src/main/java/com/juick/www/api/Service.java
@@ -37,6 +37,7 @@ import jakarta.mail.internet.AddressException;
import jakarta.mail.internet.InternetAddress;
import jakarta.mail.internet.MimeMessage;
+import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.RandomStringUtils;
@@ -221,7 +222,8 @@ public class Service {
}
@GetMapping("/api/events")
- public SseEmitter handle(@Parameter(hidden = true) User visitor) {
+ public SseEmitter handle(@Parameter(hidden = true) User visitor, HttpServletResponse response) {
+ response.addHeader("X-Accel-Buffering", "no");
logger.info("{} connected", visitor.getName());
if (!visitor.isAnonymous()) {
userService.updateLastSeen(visitor);