# Existing Sub2API and blog sites on the Singapore host. api.novamailio.com { @long_stream path /v1/responses /responses handle @long_stream { reverse_proxy 127.0.0.1:8080 { flush_interval -1 stream_close_delay 5m transport http { keepalive 30s keepalive_interval 15s keepalive_idle_conns_per_host 128 } } } handle { reverse_proxy 127.0.0.1:8080 } } xiangking.novamailio.com { root * /var/www/xiangking-blog encode zstd gzip @assets path /assets/* header @assets Cache-Control "public, max-age=31536000, immutable" file_server } whaletown.novamailio.com { log { output file /var/log/caddy/whaletown-access.json { roll_size 100MiB roll_keep 10 roll_keep_for 720h } format json } encode zstd gzip root * /var/www/whaletown/site header { X-Content-Type-Options nosniff Referrer-Policy strict-origin-when-cross-origin } @immutable_pack { path /play/packs/*.pck file {path} } header @immutable_pack { Cache-Control "public, max-age=31536000, immutable" Content-Type "application/octet-stream" } @immutable_admin path /admin/assets/* header @immutable_admin Cache-Control "public, max-age=31536000, immutable" @pack_manifest path /play/packs/manifest.json header @pack_manifest Cache-Control "no-cache" @runtime path /play/index.js /play/index.wasm /play/index-*.pck /play/index.audio*.js header @runtime Cache-Control "public, max-age=14400" @html path / /index.html /play /play/ /play/index.html /admin /admin/ /admin/index.html header @html Cache-Control "no-cache" @play_without_slash path /play redir @play_without_slash /play/ 308 handle_path /play/* { root * /var/www/whaletown/site/play file_server } @game path /game* handle @game { reverse_proxy http://124.221.77.216 { header_up Host 124.221.77.216 } } @location path /location-broadcast handle @location { reverse_proxy http://124.221.77.216 { header_up Host 124.221.77.216 } } @notice path /ws/notice handle @notice { reverse_proxy http://124.221.77.216 { header_up Host 124.221.77.216 } } @account_assets path /assets/account/* handle @account_assets { reverse_proxy http://124.221.77.216 { header_up Host 124.221.77.216 } } redir /api /api/ handle /api/* { reverse_proxy http://124.221.77.216 { header_up Host 124.221.77.216 } } redir /admin /admin/ handle_path /admin/* { root * /var/www/whaletown/admin try_files {path} /index.html file_server } handle /downloads/* { header Content-Disposition "attachment" file_server } handle { file_server } }