anchor.diff:    <%- if @oidc_discover_uri && @oidc_discover_root -%>
     # Discover URI for OpenID Connect (used for multiple Id Providers):
     #
  -  #     <%= _scheme %>://<%= _host %>:<%= _port %><%= @oidc_discover_uri %>
  +  #     <%= @ssl ? "https" : "http" %>://<%= _host %>:<%= _port %><%= @oidc_discover_uri %>
     #     #=> <%= @oidc_discover_root %>/
     #
     Alias "<%= @oidc_discover_uri %>" "<%= @oidc_discover_root %>"
  
positive.code: <% end -%>
  
  <%# Set default URI values used for redirecting -%>
  <% _scheme = @ssl ? "https" : "http"            -%>
  <% _host   = @servername || "%{SERVER_NAME}"    -%>
  <% _port   = @port || (@ssl ? "443" : "80")     -%>
  
  <% if @ssl -%>
  # Redirect all http traffic to the https Open OnDemand portal URI
  #     http://*:<%= _port %>
  #     #=> <%= _scheme %>://<%= _host %>:<%= _port %>
  #
  <VirtualHost *:80>
    RewriteEngine On
    RewriteRule ^(.*) <%= _scheme %>://<%= _host %>:<%= _port %>$1 [R=301,L]
  </VirtualHost>
  <% end -%>
  
  
negative.code:   # Control backend PUN for authenticated user:
    # NB: See mod_ood_proxy for more details.
    #
    #    <%= @ssl ? "https" : "http" %>://<%= _host %>:<%= _port %><%= @nginx_uri %>/stop
    #    #=> stops the authenticated user's PUN
    #
    SetEnv OOD_NGINX_URI "<%= @nginx_uri %>"
  