lil webfingy fix (#106)

* lil webfingy fix

* return requested content type from fede requests
This commit is contained in:
Tobi Smethurst 2021-07-21 17:46:59 +02:00 committed by GitHub
commit 113186ce4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 58 additions and 8 deletions

View file

@ -64,7 +64,7 @@ func (m *Module) WebfingerGETRequest(c *gin.Context) {
return
}
if accountDomain != m.config.AccountDomain {
if accountDomain != m.config.AccountDomain && accountDomain != m.config.Host {
l.Debugf("aborting request because accountDomain %s does not belong to this instance", accountDomain)
c.JSON(http.StatusBadRequest, gin.H{"error": fmt.Sprintf("accountDomain %s does not belong to this instance", accountDomain)})
return