1
0
Fork 0
forked from forgejo/forgejo

Cleanup, handle invalid usernames for ActivityPub person GET request

Signed-off-by: Anthony Wang <ta180m@pm.me>
This commit is contained in:
Anthony Wang 2022-03-24 18:44:44 -05:00
parent ebef769703
commit 46973f99fa
No known key found for this signature in database
GPG key ID: BC96B00AEC5F2D76
3 changed files with 6 additions and 4 deletions

View file

@ -599,9 +599,7 @@ func Routes(sessioner func(http.Handler) http.Handler) *web.Route {
if setting.Federation.Enabled {
m.Get("/nodeinfo", misc.NodeInfo)
m.Group("/activitypub", func() {
m.Group("/user/{username}", func() {
m.Get("", activitypub.Person)
})
m.Get("/user/{username}", activitypub.Person)
m.Post("/user/{username}/inbox", activitypub.ReqSignature(), activitypub.PersonInbox)
})
}