lab-ansible/roles/apps/templates/nginx/conf.d/ipfs.conf.j2
2024-02-10 23:46:05 +01:00

42 lines
1.1 KiB
Django/Jinja

{# code: language=ansible-jinja #}
# THIS FILE IS MANAGED BY ANSIBLE
server {
server_name {{ apps_vars.ipfs.domain }};
listen 8080;
set $upstream http://ipfs:{{ apps_vars.ipfs.port }};
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 "https";
proxy_http_version 1.1;
proxy_buffering off;
location / {
proxy_pass $upstream;
}
}
server {
listen 8080;
server_name ~^([\w-]+\.(ipfs|ipns)\.)?{{ apps_vars.ipfs.gateway_domain | replace('.', '\.') }}$;
set $upstream http://ipfs:{{ apps_vars.ipfs.gateway_port }};
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 "https";
proxy_http_version 1.1;
proxy_buffering off;
proxy_request_buffering off;
location / {
proxy_pass $upstream;
}
}