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

41 lines
1.1 KiB
Plaintext
Raw Normal View History

2023-12-29 18:07:08 +00:00
{# code: language=ansible-jinja #}
# THIS FILE IS MANAGED BY ANSIBLE
2023-11-11 14:47:51 +00:00
server {
server_name {{ apps_vars.ipfs.domain }};
2024-02-10 15:30:33 +00:00
listen 8080;
2024-02-10 19:03:04 +00:00
set $upstream http://ipfs:{{ apps_vars.ipfs.port }};
2024-02-10 15:30:33 +00:00
proxy_http_version 1.1;
2024-02-10 15:30:33 +00:00
proxy_buffering off;
2023-11-11 14:47:51 +00:00
location / {
2023-12-25 20:49:17 +00:00
proxy_pass $upstream;
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";
2023-11-11 14:47:51 +00:00
}
}
server {
listen 8080;
2024-01-28 18:24:00 +00:00
server_name ~^([\w-]+\.(ipfs|ipns)\.)?{{ apps_vars.ipfs.gateway_domain | replace('.', '\.') }}$;
2023-11-11 14:47:51 +00:00
2024-02-10 19:03:04 +00:00
set $upstream http://ipfs:{{ apps_vars.ipfs.gateway_port }};
2024-02-10 15:30:33 +00:00
proxy_http_version 1.1;
2024-02-10 15:30:33 +00:00
proxy_buffering off;
2023-11-11 14:47:51 +00:00
location / {
2023-12-25 20:49:17 +00:00
proxy_pass $upstream;
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";
2023-11-11 14:47:51 +00:00
}
}