diff options
| author | Aleksey Kosov <rusyak777@list.ru> | 2025-05-21 17:57:39 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-21 07:57:39 -0700 |
| commit | 5182d46e22d2458b16f1f2fb0358f6b5f3e18b5d (patch) | |
| tree | 1f95adace7c8954512150f205005a347aff3653b /weed/server/volume_server.go | |
| parent | 140b7a7402109a55072458e42a32bc1ef4a608a9 (diff) | |
| download | seaweedfs-5182d46e22d2458b16f1f2fb0358f6b5f3e18b5d.tar.xz seaweedfs-5182d46e22d2458b16f1f2fb0358f6b5f3e18b5d.zip | |
Added middleware for processing request_id grpc and http requests (#6805)
Diffstat (limited to 'weed/server/volume_server.go')
| -rw-r--r-- | weed/server/volume_server.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/weed/server/volume_server.go b/weed/server/volume_server.go index a3f072eb7..5c5ebc49a 100644 --- a/weed/server/volume_server.go +++ b/weed/server/volume_server.go @@ -115,22 +115,22 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string, vs.guard = security.NewGuard(whiteList, signingKey, expiresAfterSec, readSigningKey, readExpiresAfterSec) handleStaticResources(adminMux) - adminMux.HandleFunc("/status", vs.statusHandler) - adminMux.HandleFunc("/healthz", vs.healthzHandler) + adminMux.HandleFunc("/status", requestIDMiddleware(vs.statusHandler)) + adminMux.HandleFunc("/healthz", requestIDMiddleware(vs.healthzHandler)) if signingKey == "" || enableUiAccess { // only expose the volume server details for safe environments - adminMux.HandleFunc("/ui/index.html", vs.uiStatusHandler) + adminMux.HandleFunc("/ui/index.html", requestIDMiddleware(vs.uiStatusHandler)) /* adminMux.HandleFunc("/stats/counter", vs.guard.WhiteList(statsCounterHandler)) adminMux.HandleFunc("/stats/memory", vs.guard.WhiteList(statsMemoryHandler)) adminMux.HandleFunc("/stats/disk", vs.guard.WhiteList(vs.statsDiskHandler)) */ } - adminMux.HandleFunc("/", vs.privateStoreHandler) + adminMux.HandleFunc("/", requestIDMiddleware(vs.privateStoreHandler)) if publicMux != adminMux { // separated admin and public port handleStaticResources(publicMux) - publicMux.HandleFunc("/", vs.publicReadOnlyHandler) + publicMux.HandleFunc("/", requestIDMiddleware(vs.publicReadOnlyHandler)) } go vs.heartbeat() |
