This commit is contained in:
lbenedar
2026-03-05 12:54:29 +03:00
parent 420b876a7a
commit fc1484aebe
2 changed files with 18 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ package main
import "net/http"
func (app *application) routes() *http.ServeMux {
func (app *application) routes() http.Handler {
mux := http.NewServeMux()
fileServer := http.FileServer(http.Dir("./ui/static/"))
@@ -12,5 +12,5 @@ func (app *application) routes() *http.ServeMux {
mux.HandleFunc("/snippet/view", app.snippetView)
mux.HandleFunc("/snippet/create", app.snippetCreate)
return mux
return secureHeaders(mux)
}