This site connects to an ongoing MiningBots
game and provices an birds-eye view of the entire map
Deploying this site publicly requires all endpoints be secured, ie https
/wss
. Reverse proxy non-TLS traffic as necessary such that your browser will not block loading mixed content from https
and http
sources.
An example of a Caddyfile
(this assumes this code is stored in /opt/web/MiningBots-
game.bootcamp.tk.sg {
tls /etc/ssl/fullchain1.pem /etc/ssl/privkey1.pem # Using the same Wildcard cert obtained with certbot
header {
Access-Control-Allow-Origin *
Access-Control-Allow-Credentials true
Access-Control-Allow-Methods *
Access-Control-Allow-Headers *
defer
}
root * /opt/web/MiningBots-
file_server
}
p1.bootcamp.tk.sg {
tls /etc/ssl/fullchain1.pem /etc/ssl/privkey1.pem # Using the same Wildcard cert obtained with certbot
header {
Access-Control-Allow-Origin *
Access-Control-Allow-Credentials true
Access-Control-Allow-Methods *
Access-Control-Allow-Headers *
defer
}
reverse_proxy server.bootcamp.tk.sg:9001 {
header_down -Access-Control-Allow-Origin
}
}