Ansible roles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
263 B

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;
}