infra/roles/nginx/templates/sudo-known.conf.j2

35 lines
895 B
Django/Jinja

location = /.sudo-known/hostname {
default_type application/json;
return 200 "{{ inventory_hostname }}";
}
location = /.sudo-known/hostname.html {
default_type text/html;
return 200 "<!-- {{ inventory_hostname }} -->\n\n";
}
location = /.sudo-known/server_name {
default_type application/json;
return 200 "$server_name";
}
location = /.sudo-known/info {
default_type application/json;
return 200 '{"hostname": "{{ inventory_hostname }}", "server_name": "$server_name"}';
}
location = /.sudo-known/info.html {
default_type text/html;
return 200 '<!--\n hostname: {{ inventory_hostname }}\n server_name: $server_name\n-->\n\n ';
}
location = /.sudo-known/header.html {
default_type text/html;
alias /var/www/shared/header.html;
}
location = /.sudo-known/footer.html {
default_type text/html;
alias /var/www/shared/footer.html;
}