update to just pass instance account directly to nollamas middleware

This commit is contained in:
kim 2025-04-22 19:36:30 +01:00
commit b98ed0db3f
3 changed files with 5 additions and 13 deletions

View file

@ -499,7 +499,7 @@ var Start action.GTSAction = func(ctx context.Context) error {
s2sLimit := middleware.RateLimit(rlLimit, exceptions) // server-to-server (AP)
fsMainLimit := middleware.RateLimit(rlLimit, exceptions) // fileserver / web templates
fsEmojiLimit := middleware.RateLimit(rlLimit*2, exceptions) // fileserver (emojis only, use high limit)
nollamas := middleware.NoLLaMas(state.DB)
nollamas := middleware.NoLLaMas(instanceAccount)
// throttling
cpuMultiplier := config.GetAdvancedThrottlingMultiplier()

View file

@ -257,8 +257,6 @@ var Start action.GTSAction = func(ctx context.Context) error {
nodeInfoModule = api.NewNodeInfo(processor) // nodeinfo endpoint
activityPubModule = api.NewActivityPub(state.DB, processor) // ActivityPub endpoints
webModule = web.New(state.DB, processor) // web pages + user profiles + settings panels etc
nollamas = middleware.NoLLaMas(state.DB)
)
// these should be routed in order
@ -273,7 +271,7 @@ var Start action.GTSAction = func(ctx context.Context) error {
nodeInfoModule.Route(route)
activityPubModule.Route(route)
activityPubModule.RoutePublicKey(route)
webModule.Route(route, nollamas)
webModule.Route(route)
// Create background cleaner.
cleaner := cleaner.New(state)