​Kestra behind a reverse proxy

If you prefer to host Kestra behind a reverse proxy, you should take care that Kestra use [https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events](Server Send Event (SSE)) to display execution in real-time.

On some reverse proxy like Nginx, you need to disable buffering to enable real-time update.


A working configuration is:

location / {
    proxy_pass  http://localhost:<kestra_port>;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_read_timeout 600s;
    proxy_redirect    off;
    proxy_set_header  Host             $http_host;
    proxy_set_header  X-Real-IP        $remote_addr;
    proxy_set_header  X-Forwarded-For  $proxy_add_x_forwarded_for;
    proxy_set_header  X-Forwarded-Protocol $scheme;

    # Needed for SSE
    proxy_buffering off;
    proxy_cache off;