summaryrefslogtreecommitdiff
path: root/internal/api/activitypub.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-11-13 19:48:51 +0100
committerLibravatar GitHub <noreply@github.com>2023-11-13 19:48:51 +0100
commit8d0c017cf205bcf57630c91b53079001deed4d36 (patch)
treecf2240e3dff137df2871c9b93548a885833e9a52 /internal/api/activitypub.go
parent[chore] update otel -> v1.20.0 (#2358) (diff)
downloadgotosocial-8d0c017cf205bcf57630c91b53079001deed4d36.tar.xz
[feature/performance] Wrap incoming HTTP requests in timeout handler (#2353)
* deinterface router, start messing about with deadlines * weeeee * thanks linter (thinter) * write Connection: close when timing out requests * update wording * don't replace req * don't bother with fancy Cause functions (I'll use them one day...)
Diffstat (limited to 'internal/api/activitypub.go')
-rw-r--r--internal/api/activitypub.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/api/activitypub.go b/internal/api/activitypub.go
index 02ae0767c..0c0222d1c 100644
--- a/internal/api/activitypub.go
+++ b/internal/api/activitypub.go
@@ -35,7 +35,7 @@ type ActivityPub struct {
signatureCheckMiddleware gin.HandlerFunc
}
-func (a *ActivityPub) Route(r router.Router, m ...gin.HandlerFunc) {
+func (a *ActivityPub) Route(r *router.Router, m ...gin.HandlerFunc) {
// create groupings for the 'emoji' and 'users' prefixes
emojiGroup := r.AttachGroup("emoji")
usersGroup := r.AttachGroup("users")
@@ -54,7 +54,7 @@ func (a *ActivityPub) Route(r router.Router, m ...gin.HandlerFunc) {
}
// Public key endpoint requires different middleware + cache policies from other AP endpoints.
-func (a *ActivityPub) RoutePublicKey(r router.Router, m ...gin.HandlerFunc) {
+func (a *ActivityPub) RoutePublicKey(r *router.Router, m ...gin.HandlerFunc) {
// Create grouping for the 'users/[username]/main-key' prefix.
publicKeyGroup := r.AttachGroup(publickey.PublicKeyPath)