# DashCaddy Caddyfile
# Generated by DashCaddy Installer

# Global options
{
  admin localhost:2019
  auto_https off
}

# Dashboard
:{{PORT}} {
  root * {{DASHBOARD_PATH}}
  file_server
  encode gzip

  # API proxy
  handle /api/* {
    reverse_proxy localhost:{{API_PORT}}
  }

  # SPA fallback
  try_files {path} /index.html
}
