lab-ansible/roles/apps/templates/nginx/conf.d/ipfs.conf.j2

32 lines
840 B
Django/Jinja

{# code: language=ansible-jinja #}
# THIS FILE IS MANAGED BY ANSIBLE
server {
listen 8080;
server_name {{ apps_vars.ipfs.domain }};
location / {
set $upstream http://ipfs:5001;
proxy_pass $upstream;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto "https";
proxy_set_header X-Real-IP $remote_addr;
}
}
server {
listen 8080;
server_name ~^([\w-]+\.(ipfs|ipns)\.)?{{ apps_vars.ipfs.gateway_domain | replace('.', '\.') }}$;
location / {
set $upstream http://ipfs:8080;
proxy_pass $upstream;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto "https";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
}
}