   server {
    listen %%interface%%:%%port%% default_server;
    include /etc/nginx/includes/server_params.conf;
    include /etc/nginx/includes/proxy_params.conf;

    proxy_buffering off;

    location / {
      # Proxy pass
      proxy_pass http://localhost:8080;
      rewrite ^%%ingress_entry%%/(.*)$ /$1 break;

      # Next three lines allow websockets
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";

      # Correct base_url
      proxy_set_header Accept-Encoding "";
      sub_filter_once off;
      sub_filter_types *;
      sub_filter href=\"/ href=\"%%ingress_entry%%/;
      sub_filter src=\"/ src=\"%%ingress_entry%%/;
      sub_filter hx-get=\"/ hx-get=\"%%ingress_entry%%/;
      sub_filter hx-post=\"/ hx-post=\"%%ingress_entry%%/;
      sub_filter action=\"/ action=\"%%ingress_entry%%/;
      sub_filter EventSource('/ EventSource('%%ingress_entry%%/;
      sub_filter fetch('/ fetch('%%ingress_entry%%/;
      sub_filter "\"change\"" "\"load, change\"";
      }

}
