feat: protect post route with MARKA_API_KEY
Some checks failed
Build and Push Server / build-and-push (push) Has been cancelled
Some checks failed
Build and Push Server / build-and-push (push) Has been cancelled
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user