All Downloads are FREE. Search and download functionalities are using the official Maven repository.

config.values.yml Maven / Gradle / Ivy

# service.yml
service.singletons:
  - com.networknt.registry.URL:
    - com.networknt.registry.URLImpl:
        parameters:
          com.networknt.petstore-1.0.0: https://localhost:9443
  - com.networknt.registry.Registry:
    - com.networknt.registry.support.DirectRegistry
  - com.networknt.balance.LoadBalance:
    - com.networknt.balance.RoundRobinLoadBalance
  - com.networknt.cluster.Cluster:
    - com.networknt.cluster.LightCluster
  - com.networknt.utility.Decryptor:
    - com.networknt.decrypt.AESDecryptor

# server.yml
server.serviceId: com.networknt.gateway-1.0.0

# openapi-security.yml
openapi-security.enableVerifyJwt: false

# openapi-validator.yml
openapi-validator.enable: true

# proxy.yml
proxy.http2Enabled: true
proxy.httpsEnabled: true
proxy.hosts: https://localhost:9443

# router.yml
router.hostWhitelist:
  - 192.168.0.*
  - localhost

# handler.yml
handler.basePath: /
handler.handlers:
  # Light-framework cross-cutting concerns implemented in the microservice
  - com.networknt.exception.ExceptionHandler@exception
  - com.networknt.metrics.MetricsHandler@metrics
  - com.networknt.traceability.TraceabilityHandler@traceability
  - com.networknt.correlation.CorrelationHandler@correlation
  # Cors handler to handler post/put pre-flight. It is not used in the sidecar but only in the router.
  # - com.networknt.cors.CorsHttpHandler@cors
  - com.networknt.openapi.OpenApiHandler@specification
  - com.networknt.openapi.JwtVerifyHandler@security
  # - com.networknt.body.ProxyBodyHandler@proxybody
  - com.networknt.body.BodyHandler@body
  - com.networknt.audit.AuditHandler@audit
  # DumpHandler is to dump detail request/response info to log, useful for troubleshooting but not suggested to use in production due to it may lower the performance
  # - com.networknt.dump.DumpHandler@dump 
  - com.networknt.sanitizer.SanitizerHandler@sanitizer
  - com.networknt.openapi.ValidatorHandler@validator
  # Header middleware to manipulate request and/or response headers before or after downstream server
  - com.networknt.header.HeaderHandler@header
  # Rate limit middleware to prevent DDoS attacks externally or throttle requests internally
  - com.networknt.limit.LimitHandler@limit
  # Direct requests to named services based on the request path
  - com.networknt.router.middleware.PathPrefixServiceHandler@prefix
  - com.networknt.router.middleware.GatewayTokenHandler@token
  - com.networknt.router.GatewayRouterHandler@router
  - com.networknt.proxy.LightProxyHandler@proxy
  - com.networknt.config.reload.handler.ModuleRegistryGetHandler@modules
  - com.networknt.config.reload.handler.ConfigReloadHandler@configReload

  # Customer business domain specific cross-cutting concerns handlers
  # - com.example.validator.CustomizedValidator@custvalidator
  # Framework endpoint handlers
  - com.networknt.health.HealthGetHandler@health
  - com.networknt.proxy.ProxyHealthGetHandler@proxyHealth
  - com.networknt.logging.handler.LoggerGetHandler@getLogger
  - com.networknt.logging.handler.LoggerPostHandler@postLogger
  - com.networknt.logging.handler.LoggerGetLogContentsHandler@getLogContents
  # - com.networknt.metrics.prometheus.PrometheusGetHandler@getprometheus
  # Chaos Monkey middleware handlers and API handler
  - com.networknt.chaos.KillappAssaultHandler@killapp
  - com.networknt.chaos.LatencyAssaultHandler@latency
  - com.networknt.chaos.MemoryAssaultHandler@memory
  - com.networknt.chaos.ExceptionAssaultHandler@exchaos
  - com.networknt.chaos.ChaosMonkeyGetHandler@chaosget
  - com.networknt.chaos.ChaosMonkeyPostHandler@chaospost
  - com.networknt.info.ServerInfoGetHandler@info
  - com.networknt.specification.SpecDisplayHandler@spec
  - com.networknt.specification.SpecSwaggerUIHandler@swaggerui
  - com.networknt.specification.FaviconHandler@favicon

  # Business Handlers
handler.chains.default:
  - exception
  #- metrics
  #- limit
  - traceability
  - correlation
  - killapp
  - latency
  - memory
  - exchaos
  - audit
  - header
  - prefix
  - token
  - router
  #- specification
  #- security
  #- proxybody
  #- sanitizer
  # - dump
  #- validator
  - proxy





© 2015 - 2024 Weber Informatics LLC | Privacy Policy