bunker-admin@bunker-brain-u:~$ cloudflared tunnel create change-maker Tunnel credentials written to /home/bunker-admin/.cloudflared/32f5b38b-b8f6-4915-9107-a71511ac0089.json. cloudflared chose this file based on where your origin certificate was found. Keep this file secret. To revoke these credentials, delete the tunnel.
Created tunnel change-maker with id 32f5b38b-b8f6-4915-9107-a71511ac0089 bunker-admin@bunker-brain-u:~$
Frontend¶
bunker-admin@bunker-brain-u:~$ cloudflared tunnel create change-maker-frontend Tunnel credentials written to /home/bunker-admin/.cloudflared/67c93991-db11-4821-a761-9386247f7c60.json. cloudflared chose this file based on where your origin certificate was found. Keep this file secret. To revoke these credentials, delete the tunnel.
Created tunnel change-maker-frontend with id 67c93991-db11-4821-a761-9386247f7c60 bunker-admin@bunker-brain-u:~$
cloudflared tunnel --config ~/.cloudflared/config-change-maker.yml run
cloudflared tunnel --config ~/.cloudflared/config-change-maker-frontend.yml run
server {
listen 80;
listen [::]:80;
server_name localhost;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache";
}
location /api/ {
proxy_pass http://backend:3001/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /socket.io/ {
proxy_pass http://backend:3001/socket.io/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}