# Cloudflare Tunnel Configuration for AEI Hawaii
# This routes all subdomains through the tunnel to avoid WSL2 NAT issues
#
# Tunnel: AEI_Network
# Tunnel ID: 286e42e7-e7b5-45ac-ab8b-e28390591d57

tunnel: 286e42e7-e7b5-45ac-ab8b-e28390591d57
credentials-file: /root/.cloudflared/286e42e7-e7b5-45ac-ab8b-e28390591d57.json

# Optional: Metrics server for monitoring
# metrics: localhost:3100

# Ingress rules - route each subdomain to the local Apache server
ingress:
  # Chat application
  - hostname: chat.aeihawaii.com
    service: http://localhost:80
    originRequest:
      noTLSVerify: true

  # Dropbox/File sharing
  - hostname: dropbox.aeihawaii.com
    service: http://localhost:80
    originRequest:
      noTLSVerify: true

  # Jobs portal
  - hostname: jobs.aeihawaii.com
    service: http://localhost:80
    originRequest:
      noTLSVerify: true

  # Pre-measure application
  - hostname: premeasure.aeihawaii.com
    service: http://localhost:80
    originRequest:
      noTLSVerify: true

  # Scheduler application
  - hostname: scheduler.aeihawaii.com
    service: http://localhost:80
    originRequest:
      noTLSVerify: true

  # Support portal
  - hostname: support.aeihawaii.com
    service: http://localhost:80
    originRequest:
      noTLSVerify: true

  # Upload service
  - hostname: upload.aeihawaii.com
    service: http://localhost:80
    originRequest:
      noTLSVerify: true

  # Catch-all rule (required) - returns 404 for unmatched requests
  - service: http_status:404
