Merge pull request #770 from msteinert/robots-txt
Serve `robots.txt` from `/`
This commit is contained in:
commit
55967e1f32
2 changed files with 2 additions and 1 deletions
|
@ -1 +1 @@
|
|||
User-agent: *
|
||||
User-agent: *
|
||||
|
|
|
@ -137,6 +137,7 @@ func main() {
|
|||
// create handler for static resources
|
||||
assets := rice.MustFindBox("app").HTTPBox()
|
||||
assetserve := http.FileServer(rice.MustFindBox("app").HTTPBox())
|
||||
http.Handle("/robots.txt", assetserve)
|
||||
http.Handle("/static/", http.StripPrefix("/static", assetserve))
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Write(assets.MustBytes("index.html"))
|
||||
|
|
Loading…
Reference in a new issue