From 1164aa402041a1e167d625797db9e226710b5648 Mon Sep 17 00:00:00 2001 From: Jacky Date: Tue, 5 Nov 2024 22:20:47 +0800 Subject: [PATCH 1/2] chore: update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index bb14bf09..378917c5 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ Yet another Nginx Web UI, developed by [0xJacky](https://jackyu.cn/) and [Hintay [![Translated Status](https://weblate.nginxui.com/widget/nginx-ui/frontend/svg-badge.svg)](https://weblate.nginxui.com/engage/nginx-ui/) [![Featured|HelloGitHub](https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=86f3a8f779934748a34fe6f1b5cd442f&claim_uid=MOFqadzAShCBeQj&theme=small)](https://hellogithub.com/repository/86f3a8f779934748a34fe6f1b5cd442f) + ## Documentation To check out docs, visit [nginxui.com](https://nginxui.com). From ce68eb16588e39fb6e6f21cc6397fa03d8fde219 Mon Sep 17 00:00:00 2001 From: Jacky Date: Fri, 8 Nov 2024 09:55:00 +0800 Subject: [PATCH 2/2] enhance(sse): add X-Accel-Buffering header --- api/notification/live.go | 2 ++ install.sh | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api/notification/live.go b/api/notification/live.go index 4f028e66..25e8c6cf 100644 --- a/api/notification/live.go +++ b/api/notification/live.go @@ -11,6 +11,8 @@ func Live(c *gin.Context) { c.Header("Content-Type", "text/event-stream") c.Header("Cache-Control", "no-cache") c.Header("Connection", "keep-alive") + // https://stackoverflow.com/questions/27898622/server-sent-events-stopped-work-after-enabling-ssl-on-proxy/27960243#27960243 + c.Header("X-Accel-Buffering", "no") evtChan := make(chan *model.Notification) diff --git a/install.sh b/install.sh index edd25d0f..9d13dcec 100644 --- a/install.sh +++ b/install.sh @@ -294,8 +294,8 @@ cat > "$DataPath/app.ini" << EOF PageSize = 10 [server] -HOST = 0.0.0.0 -PORT = 9000 +Host = 0.0.0.0 +Port = 9000 RunMode = release [cert]