fix: conditional client build

This commit is contained in:
2025-03-18 14:18:24 -04:00
parent 695e1d94fd
commit 9062609eec
8 changed files with 74 additions and 47 deletions

View File

@ -0,0 +1,17 @@
package client
import (
"net/http"
"github.com/spotdemo4/trevstack/server/internal/interceptors"
)
var embedfs *http.FileSystem
func NewClientHandler(key string) http.Handler {
if embedfs != nil {
return interceptors.WithAuthRedirect(http.FileServer(*embedfs), key)
}
return http.NotFoundHandler()
}