fix: asset service (CORS and path in console) and user init (#3655)

* fix: asset service (CORS and path in console) and user init

* fix tests

* improve comment
This commit is contained in:
Livio Amstutz
2022-05-18 14:10:49 +02:00
committed by GitHub
parent 616b31c959
commit 5901991dd3
5 changed files with 66 additions and 148 deletions

View File

@@ -83,7 +83,7 @@ func NewHandler(commands *command.Commands, verifier *authz.TokenVerifier, authC
verifier.RegisterServer("Assets-API", "assets", AssetsService_AuthMethods)
router := mux.NewRouter()
router.Use(sentryhttp.New(sentryhttp.Options{}).Handle, instanceInterceptor)
router.Use(sentryhttp.New(sentryhttp.Options{}).Handle, http_mw.CORSInterceptor, instanceInterceptor)
RegisterRoutes(router, h)
router.PathPrefix("/{owner}").Methods("GET").HandlerFunc(DownloadHandleFunc(h, h.GetFile()))
return router