Disable authorize_endpoint if federation is disabled

This commit is contained in:
Anthony Wang 2022-07-23 20:52:12 -05:00
parent 763f98b517
commit 5da6b4fd84
No known key found for this signature in database
GPG Key ID: BC96B00AEC5F2D76
1 changed files with 3 additions and 1 deletions

View File

@ -1267,7 +1267,9 @@ func RegisterRoutes(m *web.Route) {
m.Get("/new", user.NewAvailable)
}, reqSignIn)
m.Get("/authorize_interaction", activitypub.AuthorizeInteraction)
if setting.Federation.Enabled {
m.Get("/authorize_interaction", activitypub.AuthorizeInteraction)
}
if setting.API.EnableSwagger {
m.Get("/swagger.v1.json", SwaggerV1Json)