Added a robots.txt file

pull/20/head^2
Slatian 2022-12-03 22:16:45 +01:00 zatwierdzone przez Alexander Cobleigh
rodzic d02edd35ca
commit b4a2e5e269
2 zmienionych plików z 5 dodań i 2 usunięć

2
html/robots.txt 100644
Wyświetl plik

@ -0,0 +1,2 @@
User-agent: *
Disallow: /*?

Wyświetl plik

@ -255,8 +255,9 @@ func Serve(config types.Config) {
http.HandleFunc("/webring", handler.webringRoute)
http.HandleFunc("/filtered", handler.filteredRoute)
fileserver := http.FileServer(http.Dir("html/assets/"))
http.Handle("/assets/", http.StripPrefix("/assets/", fileserver))
fileserver := http.FileServer(http.Dir("html/"))
http.Handle("/assets/", fileserver)
http.Handle("/robots.txt", fileserver)
portstr := fmt.Sprintf(":%d", config.General.Port)
fmt.Println("Listening on port: ", portstr)