mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-01 06:50:00 +00:00
18 lines
414 B
Go
18 lines
414 B
Go
|
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)
|
||
|
}
|