diff --git a/app/main/api/desc/front/product.api b/app/main/api/desc/front/product.api index 0818d03..9565820 100644 --- a/app/main/api/desc/front/product.api +++ b/app/main/api/desc/front/product.api @@ -26,6 +26,7 @@ service main { @server ( prefix: api/v1/product group: product + middleware: SourceInterceptor ) service main { @handler GetProductRenderList diff --git a/app/main/api/internal/handler/routes.go b/app/main/api/internal/handler/routes.go index 0540091..047a764 100644 --- a/app/main/api/internal/handler/routes.go +++ b/app/main/api/internal/handler/routes.go @@ -304,13 +304,16 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { ) server.AddRoutes( - []rest.Route{ - { - Method: http.MethodGet, - Path: "/render_list/:module", - Handler: product.GetProductRenderListHandler(serverCtx), - }, - }, + rest.WithMiddlewares( + []rest.Middleware{serverCtx.SourceInterceptor}, + []rest.Route{ + { + Method: http.MethodGet, + Path: "/render_list/:module", + Handler: product.GetProductRenderListHandler(serverCtx), + }, + }..., + ), rest.WithPrefix("/api/v1/product"), )