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:
@@ -1,4 +0,0 @@
|
|||||||
User-agent: *
|
|
||||||
Allow: /$
|
|
||||||
Disallow: /
|
|
||||||
Host: www.podsync.net
|
|
@@ -159,6 +159,14 @@ func MakeHandlers(feed feed, cfg *config.AppConfig) http.Handler {
|
|||||||
c.Redirect(http.StatusFound, "/")
|
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
|
// REST API
|
||||||
|
|
||||||
r.GET("/api/ping", func(c *gin.Context) {
|
r.GET("/api/ping", func(c *gin.Context) {
|
||||||
|
Reference in New Issue
Block a user