Further code restructuring and fix detection of space path change

This commit is contained in:
Zef Hemel
2025-09-24 12:57:56 +02:00
parent 9d6e26dfd2
commit ee3896ee75
20 changed files with 95 additions and 33 deletions
+2
View File
@@ -43,7 +43,9 @@ func RunServer(config *ServerConfig) error {
routes := chi.NewRouter()
routes.Get("/.ping", func(w http.ResponseWriter, r *http.Request) {
spaceConfig := spaceConfigFromContext(r.Context())
w.Header().Set("Cache-Control", "no-cache")
w.Header().Set("X-Space-Path", spaceConfig.SpaceFolderPath)
w.WriteHeader(http.StatusOK)
w.Write([]byte("OK"))
})