mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
remove hardcoded friendica user agent block (#239)
This commit is contained in:
@@ -20,7 +20,6 @@ package security
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
@@ -38,10 +37,4 @@ func (m *Module) UserAgentBlock(c *gin.Context) {
|
|||||||
c.AbortWithStatus(http.StatusTeapot)
|
c.AbortWithStatus(http.StatusTeapot)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if strings.Contains(strings.ToLower(ua), strings.ToLower("friendica")) {
|
|
||||||
l.Debugf("aborting request with user-agent %s because it contains 'friendica'", ua)
|
|
||||||
c.AbortWithStatus(http.StatusTeapot)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user