feat: add robots.txt setting (close #4303)

This commit is contained in:
Andy Hsu
2023-05-12 16:50:48 +08:00
parent ddc19ab699
commit 5be79eb26e
4 changed files with 9 additions and 2 deletions

View File

@ -16,6 +16,10 @@ func Favicon(c *gin.Context) {
c.Redirect(302, setting.GetStr(conf.Favicon))
}
func Robots(c *gin.Context) {
c.String(200, setting.GetStr(conf.RobotsTxt))
}
func Plist(c *gin.Context) {
linkNameB64 := strings.TrimSuffix(c.Param("link_name"), ".plist")
linkName, err := utils.SafeAtob(linkNameB64)