Skip to content

File Configuration Reference

Dynamic configuration with files

[http]
  [http.routers]
    [http.routers.Router0]
      entryPoints = ["foobar", "foobar"]
      middlewares = ["foobar", "foobar"]
      service = "foobar"
      rule = "foobar"
      priority = 42
      [http.routers.Router0.tls]
        options = "foobar"
        certResolver = "foobar"

        [[http.routers.Router0.tls.domains]]
          main = "foobar"
          sans = ["foobar", "foobar"]

        [[http.routers.Router0.tls.domains]]
          main = "foobar"
          sans = ["foobar", "foobar"]
    [http.routers.Router1]
      entryPoints = ["foobar", "foobar"]
      middlewares = ["foobar", "foobar"]
      service = "foobar"
      rule = "foobar"
      priority = 42
      [http.routers.Router1.tls]
        options = "foobar"
        certResolver = "foobar"

        [[http.routers.Router1.tls.domains]]
          main = "foobar"
          sans = ["foobar", "foobar"]

        [[http.routers.Router1.tls.domains]]
          main = "foobar"
          sans = ["foobar", "foobar"]
  [http.services]
    [http.services.Service0]
      [http.services.Service0.loadBalancer]
        passHostHeader = true
        [http.services.Service0.loadBalancer.stickiness]
          cookieName = "foobar"
          secureCookie = true
          httpOnlyCookie = true

        [[http.services.Service0.loadBalancer.servers]]
          url = "foobar"

        [[http.services.Service0.loadBalancer.servers]]
          url = "foobar"
        [http.services.Service0.loadBalancer.healthCheck]
          scheme = "foobar"
          path = "foobar"
          port = 42
          interval = "foobar"
          timeout = "foobar"
          hostname = "foobar"
          [http.services.Service0.loadBalancer.healthCheck.headers]
            name0 = "foobar"
            name1 = "foobar"
        [http.services.Service0.loadBalancer.responseForwarding]
          flushInterval = "foobar"
    [http.services.Service1]
      [http.services.Service1.loadBalancer]
        passHostHeader = true
        [http.services.Service1.loadBalancer.stickiness]
          cookieName = "foobar"
          secureCookie = true
          httpOnlyCookie = true

        [[http.services.Service1.loadBalancer.servers]]
          url = "foobar"

        [[http.services.Service1.loadBalancer.servers]]
          url = "foobar"
        [http.services.Service1.loadBalancer.healthCheck]
          scheme = "foobar"
          path = "foobar"
          port = 42
          interval = "foobar"
          timeout = "foobar"
          hostname = "foobar"
          [http.services.Service1.loadBalancer.healthCheck.headers]
            name0 = "foobar"
            name1 = "foobar"
        [http.services.Service1.loadBalancer.responseForwarding]
          flushInterval = "foobar"
  [http.middlewares]
    [http.middlewares.Middleware00]
      [http.middlewares.Middleware00.addPrefix]
        prefix = "foobar"
    [http.middlewares.Middleware01]
      [http.middlewares.Middleware01.basicAuth]
        users = ["foobar", "foobar"]
        usersFile = "foobar"
        realm = "foobar"
        removeHeader = true
        headerField = "foobar"
    [http.middlewares.Middleware02]
      [http.middlewares.Middleware02.buffering]
        maxRequestBodyBytes = 42
        memRequestBodyBytes = 42
        maxResponseBodyBytes = 42
        memResponseBodyBytes = 42
        retryExpression = "foobar"
    [http.middlewares.Middleware03]
      [http.middlewares.Middleware03.chain]
        middlewares = ["foobar", "foobar"]
    [http.middlewares.Middleware04]
      [http.middlewares.Middleware04.circuitBreaker]
        expression = "foobar"
    [http.middlewares.Middleware05]
      [http.middlewares.Middleware05.compress]
    [http.middlewares.Middleware06]
      [http.middlewares.Middleware06.digestAuth]
        users = ["foobar", "foobar"]
        usersFile = "foobar"
        removeHeader = true
        realm = "foobar"
        headerField = "foobar"
    [http.middlewares.Middleware07]
      [http.middlewares.Middleware07.errors]
        status = ["foobar", "foobar"]
        service = "foobar"
        query = "foobar"
    [http.middlewares.Middleware08]
      [http.middlewares.Middleware08.forwardAuth]
        address = "foobar"
        trustForwardHeader = true
        authResponseHeaders = ["foobar", "foobar"]
        [http.middlewares.Middleware08.forwardAuth.tls]
          ca = "foobar"
          caOptional = true
          cert = "foobar"
          key = "foobar"
          insecureSkipVerify = true
    [http.middlewares.Middleware09]
      [http.middlewares.Middleware09.headers]
        accessControlAllowCredentials = true
        accessControlAllowHeaders = ["foobar", "foobar"]
        accessControlAllowMethods = ["foobar", "foobar"]
        accessControlAllowOrigin = "foobar"
        accessControlExposeHeaders = ["foobar", "foobar"]
        accessControlMaxAge = 42
        addVaryHeader = true
        allowedHosts = ["foobar", "foobar"]
        hostsProxyHeaders = ["foobar", "foobar"]
        sslRedirect = true
        sslTemporaryRedirect = true
        sslHost = "foobar"
        sslForceHost = true
        stsSeconds = 42
        stsIncludeSubdomains = true
        stsPreload = true
        forceSTSHeader = true
        frameDeny = true
        customFrameOptionsValue = "foobar"
        contentTypeNosniff = true
        browserXssFilter = true
        customBrowserXSSValue = "foobar"
        contentSecurityPolicy = "foobar"
        publicKey = "foobar"
        referrerPolicy = "foobar"
        featurePolicy = "foobar"
        isDevelopment = true
        [http.middlewares.Middleware09.headers.customRequestHeaders]
          name0 = "foobar"
          name1 = "foobar"
        [http.middlewares.Middleware09.headers.customResponseHeaders]
          name0 = "foobar"
          name1 = "foobar"
        [http.middlewares.Middleware09.headers.sslProxyHeaders]
          name0 = "foobar"
          name1 = "foobar"
    [http.middlewares.Middleware10]
      [http.middlewares.Middleware10.ipWhiteList]
        sourceRange = ["foobar", "foobar"]
        [http.middlewares.Middleware10.ipWhiteList.ipStrategy]
          depth = 42
          excludedIPs = ["foobar", "foobar"]
    [http.middlewares.Middleware11]
      [http.middlewares.Middleware11.maxConn]
        amount = 42
        extractorFunc = "foobar"
    [http.middlewares.Middleware12]
      [http.middlewares.Middleware12.passTLSClientCert]
        pem = true
        [http.middlewares.Middleware12.passTLSClientCert.info]
          notAfter = true
          notBefore = true
          sans = true
          [http.middlewares.Middleware12.passTLSClientCert.info.subject]
            country = true
            province = true
            locality = true
            organization = true
            commonName = true
            serialNumber = true
            domainComponent = true
          [http.middlewares.Middleware12.passTLSClientCert.info.issuer]
            country = true
            province = true
            locality = true
            organization = true
            commonName = true
            serialNumber = true
            domainComponent = true
    [http.middlewares.Middleware13]
      [http.middlewares.Middleware13.redirectRegex]
        regex = "foobar"
        replacement = "foobar"
        permanent = true
    [http.middlewares.Middleware14]
      [http.middlewares.Middleware14.redirectScheme]
        scheme = "foobar"
        port = "foobar"
        permanent = true
    [http.middlewares.Middleware15]
      [http.middlewares.Middleware15.replacePath]
        path = "foobar"
    [http.middlewares.Middleware16]
      [http.middlewares.Middleware16.replacePathRegex]
        regex = "foobar"
        replacement = "foobar"
    [http.middlewares.Middleware17]
      [http.middlewares.Middleware17.retry]
        attempts = 42
    [http.middlewares.Middleware18]
      [http.middlewares.Middleware18.stripPrefix]
        prefixes = ["foobar", "foobar"]
    [http.middlewares.Middleware19]
      [http.middlewares.Middleware19.stripPrefixRegex]
        regex = ["foobar", "foobar"]

[tcp]
  [tcp.routers]
    [tcp.routers.TCPRouter0]
      entryPoints = ["foobar", "foobar"]
      service = "foobar"
      rule = "foobar"
      [tcp.routers.TCPRouter0.tls]
        passthrough = true
        options = "foobar"
        certResolver = "foobar"

        [[tcp.routers.TCPRouter0.tls.domains]]
          main = "foobar"
          sans = ["foobar", "foobar"]

        [[tcp.routers.TCPRouter0.tls.domains]]
          main = "foobar"
          sans = ["foobar", "foobar"]
    [tcp.routers.TCPRouter1]
      entryPoints = ["foobar", "foobar"]
      service = "foobar"
      rule = "foobar"
      [tcp.routers.TCPRouter1.tls]
        passthrough = true
        options = "foobar"
        certResolver = "foobar"

        [[tcp.routers.TCPRouter1.tls.domains]]
          main = "foobar"
          sans = ["foobar", "foobar"]

        [[tcp.routers.TCPRouter1.tls.domains]]
          main = "foobar"
          sans = ["foobar", "foobar"]
  [tcp.services]
    [tcp.services.TCPService0]
      [tcp.services.TCPService0.loadBalancer]

        [[tcp.services.TCPService0.loadBalancer.servers]]
          address = "foobar"

        [[tcp.services.TCPService0.loadBalancer.servers]]
          address = "foobar"
    [tcp.services.TCPService1]
      [tcp.services.TCPService1.loadBalancer]

        [[tcp.services.TCPService1.loadBalancer.servers]]
          address = "foobar"

        [[tcp.services.TCPService1.loadBalancer.servers]]
          address = "foobar"

[tls]

  [[tls.certificates]]
    certFile = "foobar"
    keyFile = "foobar"
    stores = ["foobar", "foobar"]

  [[tls.certificates]]
    certFile = "foobar"
    keyFile = "foobar"
    stores = ["foobar", "foobar"]
  [tls.options]
    [tls.options.Options0]
      minVersion = "foobar"
      cipherSuites = ["foobar", "foobar"]
      sniStrict = true
      [tls.options.Options0.clientAuth]
        caFiles = ["foobar", "foobar"]
        clientAuthType = "foobar"
    [tls.options.Options1]
      minVersion = "foobar"
      cipherSuites = ["foobar", "foobar"]
      sniStrict = true
      [tls.options.Options1.clientAuth]
        caFiles = ["foobar", "foobar"]
        clientAuthType = "foobar"
  [tls.stores]
    [tls.stores.Store0]
      [tls.stores.Store0.defaultCertificate]
        certFile = "foobar"
        keyFile = "foobar"
    [tls.stores.Store1]
      [tls.stores.Store1.defaultCertificate]
        certFile = "foobar"
        keyFile = "foobar"
http:
  routers:
    Router0:
      entryPoints:
      - foobar
      - foobar
      middlewares:
      - foobar
      - foobar
      service: foobar
      rule: foobar
      priority: 42
      tls:
        options: foobar
        certResolver: foobar
        domains:
        - main: foobar
          sans:
          - foobar
          - foobar
        - main: foobar
          sans:
          - foobar
          - foobar
    Router1:
      entryPoints:
      - foobar
      - foobar
      middlewares:
      - foobar
      - foobar
      service: foobar
      rule: foobar
      priority: 42
      tls:
        options: foobar
        certResolver: foobar
        domains:
        - main: foobar
          sans:
          - foobar
          - foobar
        - main: foobar
          sans:
          - foobar
          - foobar
  services:
    Service0:
      loadBalancer:
        stickiness:
          cookieName: foobar
          secureCookie: true
          httpOnlyCookie: true
        servers:
        - url: foobar
        - url: foobar
        healthCheck:
          scheme: foobar
          path: foobar
          port: 42
          interval: foobar
          timeout: foobar
          hostname: foobar
          headers:
            name0: foobar
            name1: foobar
        passHostHeader: true
        responseForwarding:
          flushInterval: foobar
    Service1:
      loadBalancer:
        stickiness:
          cookieName: foobar
          secureCookie: true
          httpOnlyCookie: true
        servers:
        - url: foobar
        - url: foobar
        healthCheck:
          scheme: foobar
          path: foobar
          port: 42
          interval: foobar
          timeout: foobar
          hostname: foobar
          headers:
            name0: foobar
            name1: foobar
        passHostHeader: true
        responseForwarding:
          flushInterval: foobar
  middlewares:
    Middleware00:
      addPrefix:
        prefix: foobar
    Middleware01:
      basicAuth:
        users:
        - foobar
        - foobar
        usersFile: foobar
        realm: foobar
        removeHeader: true
        headerField: foobar
    Middleware02:
      buffering:
        maxRequestBodyBytes: 42
        memRequestBodyBytes: 42
        maxResponseBodyBytes: 42
        memResponseBodyBytes: 42
        retryExpression: foobar
    Middleware03:
      chain:
        middlewares:
        - foobar
        - foobar
    Middleware04:
      circuitBreaker:
        expression: foobar
    Middleware05:
      compress: {}
    Middleware06:
      digestAuth:
        users:
        - foobar
        - foobar
        usersFile: foobar
        removeHeader: true
        realm: foobar
        headerField: foobar
    Middleware07:
      errors:
        status:
        - foobar
        - foobar
        service: foobar
        query: foobar
    Middleware08:
      forwardAuth:
        address: foobar
        tls:
          ca: foobar
          caOptional: true
          cert: foobar
          key: foobar
          insecureSkipVerify: true
        trustForwardHeader: true
        authResponseHeaders:
        - foobar
        - foobar
    Middleware09:
      headers:
        customRequestHeaders:
          name0: foobar
          name1: foobar
        customResponseHeaders:
          name0: foobar
          name1: foobar
        accessControlAllowCredentials: true
        accessControlAllowHeaders:
        - foobar
        - foobar
        accessControlAllowMethods:
        - foobar
        - foobar
        accessControlAllowOrigin: foobar
        accessControlExposeHeaders:
        - foobar
        - foobar
        accessControlMaxAge: 42
        addVaryHeader: true
        allowedHosts:
        - foobar
        - foobar
        hostsProxyHeaders:
        - foobar
        - foobar
        sslRedirect: true
        sslTemporaryRedirect: true
        sslHost: foobar
        sslProxyHeaders:
          name0: foobar
          name1: foobar
        sslForceHost: true
        stsSeconds: 42
        stsIncludeSubdomains: true
        stsPreload: true
        forceSTSHeader: true
        frameDeny: true
        customFrameOptionsValue: foobar
        contentTypeNosniff: true
        browserXssFilter: true
        customBrowserXSSValue: foobar
        contentSecurityPolicy: foobar
        publicKey: foobar
        referrerPolicy: foobar
        featurePolicy: foobar
        isDevelopment: true
    Middleware10:
      ipWhiteList:
        sourceRange:
        - foobar
        - foobar
        ipStrategy:
          depth: 42
          excludedIPs:
          - foobar
          - foobar
    Middleware11:
      maxConn:
        amount: 42
        extractorFunc: foobar
    Middleware12:
      passTLSClientCert:
        pem: true
        info:
          notAfter: true
          notBefore: true
          sans: true
          subject:
            country: true
            province: true
            locality: true
            organization: true
            commonName: true
            serialNumber: true
            domainComponent: true
          issuer:
            country: true
            province: true
            locality: true
            organization: true
            commonName: true
            serialNumber: true
            domainComponent: true
    Middleware13:
      redirectRegex:
        regex: foobar
        replacement: foobar
        permanent: true
    Middleware14:
      redirectScheme:
        scheme: foobar
        port: foobar
        permanent: true
    Middleware15:
      replacePath:
        path: foobar
    Middleware16:
      replacePathRegex:
        regex: foobar
        replacement: foobar
    Middleware17:
      retry:
        attempts: 42
    Middleware18:
      stripPrefix:
        prefixes:
        - foobar
        - foobar
    Middleware19:
      stripPrefixRegex:
        regex:
        - foobar
        - foobar
tcp:
  routers:
    TCPRouter0:
      entryPoints:
      - foobar
      - foobar
      service: foobar
      rule: foobar
      tls:
        passthrough: true
        options: foobar
        certResolver: foobar
        domains:
        - main: foobar
          sans:
          - foobar
          - foobar
        - main: foobar
          sans:
          - foobar
          - foobar
    TCPRouter1:
      entryPoints:
      - foobar
      - foobar
      service: foobar
      rule: foobar
      tls:
        passthrough: true
        options: foobar
        certResolver: foobar
        domains:
        - main: foobar
          sans:
          - foobar
          - foobar
        - main: foobar
          sans:
          - foobar
          - foobar
  services:
    TCPService0:
      loadBalancer:
        servers:
        - address: foobar
        - address: foobar
    TCPService1:
      loadBalancer:
        servers:
        - address: foobar
        - address: foobar
tls:
  certificates:
  - certFile: foobar
    keyFile: foobar
    stores:
    - foobar
    - foobar
  - certFile: foobar
    keyFile: foobar
    stores:
    - foobar
    - foobar
  options:
    Options0:
      minVersion: foobar
      cipherSuites:
      - foobar
      - foobar
      clientAuth:
        caFiles:
        - foobar
        - foobar
        clientAuthType: foobar
      sniStrict: true
    Options1:
      minVersion: foobar
      cipherSuites:
      - foobar
      - foobar
      clientAuth:
        caFiles:
        - foobar
        - foobar
        clientAuthType: foobar
      sniStrict: true
  stores:
    Store0:
      defaultCertificate:
        certFile: foobar
        keyFile: foobar
    Store1:
      defaultCertificate:
        certFile: foobar
        keyFile: foobar