some lil fixes for kibou compatibility

This commit is contained in:
tsmethurst 2021-06-12 16:40:11 +02:00
commit d9d9a7a626
12 changed files with 102 additions and 36 deletions

View file

@ -0,0 +1,17 @@
package security
import (
"net/http"
"github.com/gin-gonic/gin"
)
const robotsString = `User-agent: *
Disallow: /
`
// RobotsGETHandler returns the most restrictive possible robots.txt file in response to a call to /robots.txt.
// The response instructs bots with *any* user agent not to index the instance at all.
func (m *Module) RobotsGETHandler(c *gin.Context) {
c.String(http.StatusOK, robotsString)
}