# The extension update server — rendered into the autotrader stack's nginx/conf.d # by deploy.sh. Edit the template, not the rendered file. server { listen 80; listen [::]:80; server_name ${EXT_HOST}; location /.well-known/acme-challenge/ { root /var/www/certbot; } location / { return 301 https://$host$request_uri; } } server { listen 443 ssl; listen [::]:443 ssl; http2 on; server_name ${EXT_HOST}; ssl_certificate /etc/letsencrypt/live/${EXT_HOST}/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/${EXT_HOST}/privkey.pem; ssl_protocols TLSv1.2 TLSv1.3; ssl_prefer_server_ciphers off; ssl_session_cache shared:SSL:10m; ssl_session_timeout 1d; add_header Strict-Transport-Security "max-age=31536000" always; add_header X-Content-Type-Options "nosniff" always; # Two public files: the update manifest and the signed CRX. Both are meant to # be readable by anyone — Chrome fetches them with no cookies and no way to # authenticate, which is why there is no auth here. The CRX is signed, and # carries no credentials; the private key stays on the droplet. location / { proxy_pass http://autofirmer-updates/; proxy_http_version 1.1; proxy_set_header Host $host; 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; } }