mirror of
https://codeberg.org/superseriousbusiness/gotosocial.git
synced 2024-12-28 11:58:16 +03: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)
|
||
|
}
|