matrix-docker-compose/development/matrix_extDB/matrix_noDB_redis/element/element.conf.sh
2024-01-05 11:20:18 +01:00

30 lines
823 B
Bash
Executable file

#!/bin/sh
cat << EOF > /etc/nginx/conf.d/element.conf
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name $ELEMENTWEB;
ssl_certificate /etc/letsencrypt/live/$ELEMENTWEB/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/$ELEMENTWEB/privkey.pem;
client_max_body_size 512m;
location / {
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto \$scheme;
proxy_set_header Host \$http_host;
proxy_set_header X-Real-IP \$remote_addr;
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header Content-Security-Policy "frame-ancestors 'none'";
proxy_pass http://localhost:8080;
}
}
EOF