Skip to content

Commit ce49912

Browse files
backend: Add setupStaticFiles function
Signed-off-by: SinghaAnirban005 <[email protected]>
1 parent a614ab7 commit ce49912

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

backend/cmd/headlamp.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,12 @@ func setupInClusterContext(config *HeadlampConfig) {
444444
}
445445
}
446446

447+
func setupStaticFiles(config *HeadlampConfig) {
448+
if config.StaticDir != "" {
449+
baseURLReplace(config.StaticDir, config.BaseURL)
450+
}
451+
}
452+
447453
func parseClusterAndToken(r *http.Request) (string, string) {
448454
cluster := ""
449455
re := regexp.MustCompile(`^/clusters/([^/]+)/.*`)

0 commit comments

Comments
 (0)