global:
  checkNewVersion: true
  sendAnonymousUsage: false

api:
  dashboard: true
  debug: false
  insecure: true

log:
  level: INFO
  filePath: /logs/traefik.log

accessLog:
  filePath: /logs/access.log

entryPoints:
  web:
    address: :80
    http:
      redirections:
        entryPoint:
          to: websecure
          scheme: https
          permanent: true

  websecure:
    address: :443
    transport:
      respondingTimeouts:
        readTimeout: 60s
        writeTimeout: 60s
        idleTimeout: 180s
      lifeCycle:
        requestAcceptGraceTimeout: 10s
        graceTimeOut: 10s
    http:
      tls:
        certResolver: cloudflare
        domains:
          - main: ai-impress.com
            sans:
              - "*.ai-impress.com"
              - "*.n8n.ai-impress.com"

providers:
  docker:
    endpoint: unix:///var/run/docker.sock
    exposedByDefault: false
    network: traefik-public

  file:
    filename: /dynamic.yml
    watch: true

certificatesResolvers:
  cloudflare:
    acme:
      email: v.samoilenko@ai-impress.com
      storage: /acme/acme.json
      dnsChallenge:
        provider: cloudflare
        resolvers:
          - "1.1.1.1:53"
          - "1.0.0.1:53"
        delayBeforeCheck: 30

# Дополнительные настройки для обработки больших запросов
serversTransport:
  maxIdleConnsPerHost: 200
  forwardingTimeouts:
    dialTimeout: 30s
    responseHeaderTimeout: 60s

# Настройки для больших заголовков (решение 431 ошибки)
# Увеличиваем буферы для обработки больших заголовков от Authelia
experimental:
  http3: false

# Увеличение лимитов для заголовков
core:
  defaultRuleSyntax: v3
