nginx: fix gitea proxy headers

This commit is contained in:
CPunch 2024-02-27 18:11:03 -06:00
parent 262e350f7b
commit 540f63cd85

View File

@ -38,12 +38,18 @@
ssl_ciphers HIGH:!aNULL:!MD5; ssl_ciphers HIGH:!aNULL:!MD5;
- listen: "443 ssl http2" - listen: "443 ssl http2"
server_name: "git.{{ domain }}" server_name: "git.{{ domain }}"
client_max_body_size: "100M" client_max_body_size: "512M"
extra_parameters: | extra_parameters: |
listen [::]:443 ssl http2; listen [::]:443 ssl http2;
location / { location / {
add_header Permissions-Policy interest-cohort=(); add_header Permissions-Policy interest-cohort=();
proxy_pass http://localhost:{{ giteaPort }}; proxy_pass http://localhost:{{ giteaPort }};
proxy_set_header Connection $http_connection;
proxy_set_header Upgrade $http_upgrade;
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;
} }
ssl_certificate /etc/letsencrypt/live/{{ domain }}/fullchain.pem; ssl_certificate /etc/letsencrypt/live/{{ domain }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ domain }}/privkey.pem; ssl_certificate_key /etc/letsencrypt/live/{{ domain }}/privkey.pem;