mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-06 08:36:55 +02:00
Update to 2021-12-01 19:13
This commit is contained in:
15
roles/nginx/templates/ansible_conf.d/force_ssl.inc.j2
Normal file
15
roles/nginx/templates/ansible_conf.d/force_ssl.inc.j2
Normal file
@@ -0,0 +1,15 @@
|
||||
set $ssl 1;
|
||||
if ($scheme = 'https') {
|
||||
set $ssl 0;
|
||||
}
|
||||
if ($remote_addr = '127.0.0.1'){
|
||||
set $ssl 0;
|
||||
}
|
||||
{% for ip in ansible_all_ipv4_addresses %}
|
||||
if ($remote_addr = '{{ ip }}'){
|
||||
set $ssl 0;
|
||||
}
|
||||
{% endfor %}
|
||||
if ($ssl = 1){
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
Reference in New Issue
Block a user