don't bother negotiating Accept for webfinger (#381)
This commit is contained in:
parent
85b4f96263
commit
5c9d20cea3
|
@ -28,7 +28,6 @@ import (
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/ap"
|
"github.com/superseriousbusiness/gotosocial/internal/ap"
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/api"
|
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/config"
|
"github.com/superseriousbusiness/gotosocial/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -68,11 +67,6 @@ func (m *Module) WebfingerGETRequest(c *gin.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, err := api.NegotiateAccept(c, api.JSONAcceptHeaders...); err != nil {
|
|
||||||
c.JSON(http.StatusNotAcceptable, gin.H{"error": err.Error()})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// remove the acct: prefix if it's present
|
// remove the acct: prefix if it's present
|
||||||
trimAcct := strings.TrimPrefix(resourceQuery, "acct:")
|
trimAcct := strings.TrimPrefix(resourceQuery, "acct:")
|
||||||
// remove the first @ in @whatever@example.org if it's present
|
// remove the first @ in @whatever@example.org if it's present
|
||||||
|
|
Loading…
Reference in New Issue