add important headers

This commit is contained in:
ari melody 2024-12-07 19:25:45 +00:00
parent ff6d157e6b
commit 2f24020263
Signed by: ari
GPG key ID: CF99829C92678188
2 changed files with 49 additions and 7 deletions

View file

@ -67,7 +67,10 @@ func main() {
// start the web server!
mux := createServeMux()
fmt.Printf("Now serving at http://127.0.0.1:%d\n", global.Config.Port)
log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", global.Config.Port), global.HTTPLog(mux)))
log.Fatal(
http.ListenAndServe(fmt.Sprintf(":%d", global.Config.Port),
global.HTTPLog(global.DefaultHeaders(mux)),
))
}
func createServeMux() *http.ServeMux {