mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-30 15:42:25 -05:00
some lil fixes for kibou compatibility
This commit is contained in:
parent
6994859d03
commit
d9d9a7a626
12 changed files with 102 additions and 36 deletions
|
|
@ -19,12 +19,16 @@
|
|||
package security
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/api"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/config"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/router"
|
||||
)
|
||||
|
||||
const robotsPath = "/robots.txt"
|
||||
|
||||
// Module implements the ClientAPIModule interface for security middleware
|
||||
type Module struct {
|
||||
config *config.Config
|
||||
|
|
@ -44,5 +48,6 @@ func (m *Module) Route(s router.Router) error {
|
|||
s.AttachMiddleware(m.FlocBlock)
|
||||
s.AttachMiddleware(m.ExtraHeaders)
|
||||
s.AttachMiddleware(m.UserAgentBlock)
|
||||
s.AttachHandler(http.MethodGet, robotsPath, m.RobotsGETHandler)
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue