http: middlewares: redirect-to-https: redirectScheme: scheme: https pangolin-geoblock: plugin: geoblock: allowLocalRequests: true allowUnknownCountries: false api: https://get.geojs.io/v1/ip/country/{ip} apiTimeoutMs: 150 cacheSize: 15 blackListMode: false countries: - CA - US - FI forceMonthlyUpdate: true logAllowedRequests: false logApiRequests: false logLocalRequests: true silentStartUp: false unknownCountryApiResponse: "nil" logFilePath: "/logs/traefik/traefik_geoblock.log" routers: # HTTP to HTTPS redirect router main-app-router-redirect: rule: "Host(`proxy.domain.tld`)" # REPLACE THIS WITH YOUR DOMAIN service: next-service entryPoints: - web middlewares: - redirect-to-https # Next.js router (handles everything except API and WebSocket paths) next-router: rule: "Host(`proxy.domain.tld`) && !PathPrefix(`/api/v1`)" # REPLACE THIS WITH YOUR DOMAIN service: next-service entryPoints: - websecure tls: certResolver: letsencrypt domains: - main: "domain.tld" sans: - "*.domain.tld" # API router (handles /api/v1 paths) api-router: rule: "Host(`proxy.domain.tld`) && PathPrefix(`/api/v1`)" # REPLACE THIS WITH YOUR DOMAIN service: api-service entryPoints: - websecure tls: certResolver: letsencrypt # WebSocket router ws-router: rule: "Host(`proxy.domain.tld`)" # REPLACE THIS WITH YOUR DOMAIN service: api-service entryPoints: - websecure tls: certResolver: letsencrypt services: next-service: loadBalancer: servers: - url: "http://pangolin:3002" # Next.js server api-service: loadBalancer: servers: - url: "http://pangolin:3000" # API/WebSocket server