feat: protect post route with MARKA_API_KEY
Some checks failed
Build and Push Server / build-and-push (push) Has been cancelled

This commit is contained in:
Max Richter
2025-10-31 14:28:30 +01:00
parent 814be43be8
commit 6c47c8c3e9
2 changed files with 15 additions and 2 deletions

View File

@@ -61,7 +61,8 @@ func main() {
fsAdapter, err := adapters.NewLocalFsAdapter(absRoots)
must(err)
http.Handle("/", handler.NewHandler(fsAdapter))
apiKey := os.Getenv("MARKA_API_KEY")
http.Handle("/", handler.NewHandler(fsAdapter, apiKey))
log.Printf("listening on %s, roots=%s", *addr, strings.Join(absRoots, ", "))
log.Fatal(http.ListenAndServe(*addr, nil))