mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[bugfix] Serve correct 'application/jrd+json' content type for webfinger requests (#1738)
* [bugfix] Return `application/jrd+json` from webfinger queries * update finger req content-type
This commit is contained in:
@@ -18,12 +18,7 @@
|
||||
package webfinger_test
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"crypto/rsa"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/suite"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/ap"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/api/wellknown/webfinger"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/db"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/email"
|
||||
@@ -103,34 +98,3 @@ func (suite *WebfingerStandardTestSuite) TearDownTest() {
|
||||
testrig.StandardStorageTeardown(suite.storage)
|
||||
testrig.StopWorkers(&suite.state)
|
||||
}
|
||||
|
||||
func accountDomainAccount() *gtsmodel.Account {
|
||||
privateKey, err := rsa.GenerateKey(rand.Reader, 2048)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
publicKey := &privateKey.PublicKey
|
||||
|
||||
acct := >smodel.Account{
|
||||
ID: "01FG1K8EA7SYHEC7V6XKVNC4ZA",
|
||||
CreatedAt: time.Now(),
|
||||
UpdatedAt: time.Now(),
|
||||
Username: "aaaaa",
|
||||
Domain: "",
|
||||
Privacy: gtsmodel.VisibilityDefault,
|
||||
Language: "en",
|
||||
URI: "http://gts.example.org/users/aaaaa",
|
||||
URL: "http://gts.example.org/@aaaaa",
|
||||
InboxURI: "http://gts.example.org/users/aaaaa/inbox",
|
||||
OutboxURI: "http://gts.example.org/users/aaaaa/outbox",
|
||||
FollowingURI: "http://gts.example.org/users/aaaaa/following",
|
||||
FollowersURI: "http://gts.example.org/users/aaaaa/followers",
|
||||
FeaturedCollectionURI: "http://gts.example.org/users/aaaaa/collections/featured",
|
||||
ActorType: ap.ActorPerson,
|
||||
PrivateKey: privateKey,
|
||||
PublicKey: publicKey,
|
||||
PublicKeyURI: "http://gts.example.org/users/aaaaa/main-key",
|
||||
}
|
||||
|
||||
return acct
|
||||
}
|
||||
|
Reference in New Issue
Block a user