2026-01-27 13:25:45: merge [main:e5e723811e7a9dc57a6ff5d1c067c07c23a97210];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
This commit is contained in:
1 parent
6a3abf67a2
commit
602a2a1ac4
24 files changed
+222
-114
No files matched your search
@@ -74,7 +74,7 @@ func New(boot *bootstrap.Bootstrap) (*Assembly, error) {
|
||||
boot: boot,
|
||||
server: server,
|
||||
logger: boot.App.Logger(),
|
||||
routes: routes.NewRoutes(),
|
||||
routes: routes.NewRoutes(boot.App.Logger()),
|
||||
locations: localConfig.Locations,
|
||||
grpcClientByModuleName: grpcClientByModuleName,
|
||||
httpHostManagerByModuleName: httpHostManagerByModuleName,
|
||||
|
||||
+11
-5
@@ -1,11 +1,12 @@
|
||||
package assembly
|
||||
|
||||
import (
|
||||
"github.com/txix-open/isp-kit/metrics"
|
||||
"github.com/txix-open/isp-kit/metrics/http_metrics"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/txix-open/isp-kit/metrics"
|
||||
"github.com/txix-open/isp-kit/metrics/http_metrics"
|
||||
|
||||
"isp-gate-service/conf"
|
||||
"isp-gate-service/middleware"
|
||||
"isp-gate-service/proxy"
|
||||
@@ -110,13 +111,16 @@ func (l Locator) Handler(config conf.Remote, locations []conf.Location) (http.Ha
|
||||
middleware.Authenticate(authentication),
|
||||
middleware.AdminAuthenticate(adminService),
|
||||
middleware.Authorize(authorization, l.logger),
|
||||
middleware.AdminAuthorize(l.routes, adminService),
|
||||
middleware.AdminAuthorize(adminService),
|
||||
middleware.Throttling(throttlingService),
|
||||
middleware.DailyLimit(dailyLimitService),
|
||||
middleware.RequestId(config.EnableClientRequestIdForwarding, forwardReqIdByAppId),
|
||||
middleware.Metrics(metricsStorage),
|
||||
)
|
||||
|
||||
errorOnUnknownEndpoint := true
|
||||
if location.SkipAuth {
|
||||
errorOnUnknownEndpoint = false
|
||||
handler = middleware.Chain(
|
||||
proxyFunc,
|
||||
middleware.Logger(l.logger, config.Logging.RequestLogEnable,
|
||||
@@ -133,8 +137,10 @@ func (l Locator) Handler(config conf.Remote, locations []conf.Location) (http.Ha
|
||||
config.Http.MaxRequestBodySizeInMb*1024*1024, //nolint:mnd
|
||||
handler,
|
||||
middleware.EntryPointConfig{
|
||||
WithPrefix: location.WithPrefix,
|
||||
PathPrefix: location.PathPrefix,
|
||||
WithPrefix: location.WithPrefix,
|
||||
PathPrefix: location.PathPrefix,
|
||||
ErrorOnUnknownEndpoint: errorOnUnknownEndpoint,
|
||||
WithLendingSlash: location.Protocol != conf.GrpcProtocol,
|
||||
},
|
||||
l.routes,
|
||||
l.logger,
|
||||
|
||||
Reference in new issue
Block a user