Skip to content

Commit

Permalink
Merge pull request #770 from msteinert/robots-txt
Browse files Browse the repository at this point in the history
Serve `robots.txt` from `/`
  • Loading branch information
bradrydzewski committed Dec 27, 2014
2 parents f1c5a45 + 441de03 commit 55967e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion server/app/robots.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
User-agent: *
User-agent: *
1 change: 1 addition & 0 deletions server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit 55967e1

Please sign in to comment.