anchor.diff:    <% if force_ssl %>
     if ($ssl_protocol = "") {
        rewrite ^   https://$server_name$request_uri? permanent;
  -  }    
  +  }
     <% end %>
     
     <% end %>
  
positive.code:   listen 80;
    server_name <%= additional_domains %> <%= app %>.<%= base_domain %>;
  
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header Host $http_host;
    proxy_redirect off;
  
    <% if use_ssl %>
    listen 443 ssl;
  
negative.code: 
    location @app {
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Proto $scheme;
      proxy_set_header Host $http_host;
      proxy_redirect off;
  
      if ($ssl_protocol != "") {
        proxy_set_header HTTPS "on";
      }
  
      proxy_pass http://<%= app %>;
    }
  