mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-27 04:11:03 +00:00
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
|
@ -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