mirror of
https://github.com/jlelse/GoBlog
synced 2024-06-28 14:57:34 +00:00
15 lines
346 B
Go
15 lines
346 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"net/http"
|
|
)
|
|
|
|
func serveRobotsTXT(w http.ResponseWriter, r *http.Request) {
|
|
_, _ = w.Write([]byte(fmt.Sprintf("User-agent: *\nSitemap: %v", appConfig.Server.PublicAddress+sitemapPath)))
|
|
}
|
|
|
|
func servePrivateRobotsTXT(w http.ResponseWriter, r *http.Request) {
|
|
_, _ = w.Write([]byte("User-agent: *\nDisallow: /"))
|
|
}
|