2020-11-09 15:40:12 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
2021-06-06 12:39:42 +00:00
|
|
|
func (a *goBlog) serveRobotsTXT(w http.ResponseWriter, r *http.Request) {
|
2021-06-10 20:09:50 +00:00
|
|
|
_, _ = w.Write([]byte(fmt.Sprintf("User-agent: *\nSitemap: %v", a.getFullAddress(sitemapPath))))
|
2020-11-09 15:40:12 +00:00
|
|
|
}
|
2021-02-27 07:31:06 +00:00
|
|
|
|
|
|
|
func servePrivateRobotsTXT(w http.ResponseWriter, r *http.Request) {
|
|
|
|
_, _ = w.Write([]byte("User-agent: *\nDisallow: /"))
|
|
|
|
}
|