diff --git a/.gitignore b/.gitignore index fdc0cb0..e137b98 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ test.db user_dbs/ todo-web -static/img/login/* diff --git a/main.go b/main.go index 59f9353..d1649cc 100644 --- a/main.go +++ b/main.go @@ -69,6 +69,7 @@ func addFrontendEndpoints(mux *http.ServeMux, static_path string) { mux.Handle("/js/", fileServer) mux.Handle("/img/", fileServer) mux.HandleFunc("/img/login.jpg", func(w http.ResponseWriter, r *http.Request) { pages.RandomImage(w, r, path.Join(static_path, "img/login/")) }) + mux.HandleFunc("/img/login/", Error404) } func addBackendEndpoints(mux *http.ServeMux) { diff --git a/static/img/.gitignore b/static/img/.gitignore new file mode 100644 index 0000000..76ce7fc --- /dev/null +++ b/static/img/.gitignore @@ -0,0 +1 @@ +*.jpg