1
0
mirror of https://github.com/mxpv/podsync.git synced 2024-05-11 05:55:04 +00:00

Server robots.txt via gin

This commit is contained in:
Maksym Pavlenko
2017-08-22 16:18:07 -07:00
parent 257dacce94
commit b88cd90a93
2 changed files with 8 additions and 4 deletions

View File

@ -1,4 +0,0 @@
User-agent: *
Allow: /$
Disallow: /
Host: www.podsync.net

View File

@ -159,6 +159,14 @@ func MakeHandlers(feed feed, cfg *config.AppConfig) http.Handler {
c.Redirect(http.StatusFound, "/")
})
// GET /robots.txt
r.GET("/robots.txt", func(c *gin.Context) {
c.String(http.StatusOK, `User-agent: *
Allow: /$
Disallow: /
Host: www.podsync.net`)
})
// REST API
r.GET("/api/ping", func(c *gin.Context) {