feat(http): allow passing middlewares via options
All checks were successful
arcad/edge/pipeline/head This commit looks good
All checks were successful
arcad/edge/pipeline/head This commit looks good
This commit is contained in:
@ -216,15 +216,17 @@ func runApp(ctx context.Context, path string, address string, storageFile string
|
||||
authModule.WithJWT(dummyKeySet),
|
||||
),
|
||||
),
|
||||
appHTTP.WithHTTPMiddlewares(
|
||||
authModuleMiddleware.AnonymousUser(
|
||||
jwa.HS256, key,
|
||||
),
|
||||
),
|
||||
)
|
||||
if err := handler.Load(bundle); err != nil {
|
||||
return errors.Wrap(err, "could not load app bundle")
|
||||
}
|
||||
|
||||
router := chi.NewRouter()
|
||||
router.Use(authModuleMiddleware.AnonymousUser(
|
||||
jwa.HS256, key,
|
||||
))
|
||||
router.Use(middleware.Logger)
|
||||
router.Use(middleware.Compress(5))
|
||||
|
||||
|
Reference in New Issue
Block a user