mirror of
https://github.com/argoproj/argo-cd
synced 2026-05-24 01:38:43 +00:00
fix: gzip static resources if gzip is enabled (#6279)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
This commit is contained in:
parent
b2f547e5ab
commit
b57ba42b9d
1 changed files with 5 additions and 1 deletions
|
|
@ -734,7 +734,11 @@ func (a *ArgoCDServer) newHTTPServer(ctx context.Context, port int, grpcWebHandl
|
|||
|
||||
// Serve UI static assets
|
||||
if a.StaticAssetsDir != "" {
|
||||
mux.HandleFunc("/", a.newStaticAssetsHandler(a.StaticAssetsDir, a.BaseHRef))
|
||||
var assetsHandler http.Handler = http.HandlerFunc(a.newStaticAssetsHandler(a.StaticAssetsDir, a.BaseHRef))
|
||||
if a.ArgoCDServerOpts.EnableGZip {
|
||||
assetsHandler = compressHandler(assetsHandler)
|
||||
}
|
||||
mux.Handle("/", assetsHandler)
|
||||
}
|
||||
return &httpS
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue