Skip to content

Commit e6741b9

Browse files
committed
make "/attachments/{uuid}" use CORS
1 parent eedb711 commit e6741b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/web/web.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ func registerRoutes(m *web.Route) {
780780

781781
m.Group("", func() {
782782
m.Get("/{username}", user.UsernameSubRoute)
783-
m.Get("/attachments/{uuid}", repo.GetAttachment)
783+
m.Methods("GET, OPTIONS", "/attachments/{uuid}", optionsCorsHandler(), repo.GetAttachment)
784784
}, ignSignIn)
785785

786786
m.Post("/{username}", reqSignIn, context_service.UserAssignmentWeb(), user.Action)

0 commit comments

Comments
 (0)