# Dev-only front proxy for The Lacuna Expanse. Plain HTTP on :80 (published as # localhost:8080 by docker-compose.yml). Point a UI client's server URL at # http://localhost:8080/ and it gets the Perl API, captchas, and server info files. # Unlike prod there are no app / alliance-starmap / super-ui upstreams: run the # UI client yourself. { auto_https off } :80 { encode gzip # The UI client is served from a different origin in dev header { Access-Control-Allow-Origin "*" Access-Control-Allow-Headers "content-type,x-requested-with,authorization" Cache-Control "no-cache" defer } @preflight method OPTIONS respond @preflight 204 # Captcha files generated by the server handle_path /captcha/* { root * /home/lacuna/server/public/captcha file_server } # Server info such as stars.json and server_overview.json handle_path /server/* { root * /home/lacuna/server/public/server file_server } # Public rss feeds for the Network19 handle_path /network19/* { root * /home/lacuna/server/public/network19 file_server } # Public rss feeds for the mission command handle_path /missioncommand/* { root * /home/lacuna/server/public/missioncommand file_server } # V2 API handle /v2/* { reverse_proxy v2-api:5999 { header_up X-Forwarded-Host {remote_host} } } # Fallback: serve the handful of public files, funnel everything else into the Perl backend handle { root * /home/lacuna/server/public route { try_files {path} {path}/index.html @dynamic not file reverse_proxy @dynamic server:5000 { header_up X-Real-IP {remote_host} } file_server } } }