mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 09:52:26 -05:00
[chore/bugfix] Serve + throttle publickey separately from rest of ActivityPub API (#1461)
* serve publickey separately from AP, don't throttle it * update nginx cache documentation, cache main-key too * throttle public key, but separately from other endpoints
This commit is contained in:
parent
52fbb3e584
commit
27e95fd123
7 changed files with 117 additions and 47 deletions
|
|
@ -206,6 +206,7 @@ var Start action.GTSAction = func(ctx context.Context) error {
|
|||
clThrottle := middleware.Throttle(cpuMultiplier) // client api
|
||||
s2sThrottle := middleware.Throttle(cpuMultiplier) // server-to-server (AP)
|
||||
fsThrottle := middleware.Throttle(cpuMultiplier) // fileserver / web templates
|
||||
pkThrottle := middleware.Throttle(cpuMultiplier) // throttle public key endpoint separately
|
||||
|
||||
gzip := middleware.Gzip() // applied to all except fileserver
|
||||
|
||||
|
|
@ -217,6 +218,7 @@ var Start action.GTSAction = func(ctx context.Context) error {
|
|||
wellKnownModule.Route(router, gzip, s2sLimit, s2sThrottle)
|
||||
nodeInfoModule.Route(router, s2sLimit, s2sThrottle, gzip)
|
||||
activityPubModule.Route(router, s2sLimit, s2sThrottle, gzip)
|
||||
activityPubModule.RoutePublicKey(router, s2sLimit, pkThrottle, gzip)
|
||||
webModule.Route(router, fsLimit, fsThrottle, gzip)
|
||||
|
||||
gts, err := gotosocial.NewServer(dbService, router, federator, mediaManager)
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ var Start action.GTSAction = func(ctx context.Context) error {
|
|||
wellKnownModule.Route(router)
|
||||
nodeInfoModule.Route(router)
|
||||
activityPubModule.Route(router)
|
||||
activityPubModule.RoutePublicKey(router)
|
||||
webModule.Route(router)
|
||||
|
||||
gts, err := gotosocial.NewServer(dbService, router, federator, mediaManager)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue