Enketo not loading

1. What is the issue? Please be detailed.
I upgraded ODK central to latest version 2023.4 in multiple steps from 1.2.2
All forms and data are showing and I am able to downlaod submissions
However the ENKETO editing is not working
I get a circular pulsing bubble in middle and then I get an error

2. What steps can we take to reproduce this issue?
I am behind a reverse proxy where SSL termination happens

My configurations are shared here

.env

DOMAIN=survey.xxx.yyyu

# Used for Let's Encrypt expiration emails and Enketo technical support emails
SYSADMIN_EMAIL=XX@YYY.COM

# Options: letsencrypt, customssl, upstream, selfsign
SSL_TYPE=upstream

# Do not change if using SSL_TYPE=letsencrypt
HTTP_PORT=80
HTTPS_PORT=443
UPSTREAM_HTTPS_PORT=443


docker-compose.yml

  service:
...
    environment:
      - HTTPS_PORT=${UPSTREAM_HTTPS_PORT:-443}
.....
  nginx:
    build:
      context: .
      args:
        - OIDC_ENABLED=${OIDC_ENABLED:-false}
      dockerfile: nginx.dockerfile
    depends_on:
      - service
      - enketo
    environment:
      - DOMAIN=${DOMAIN}
      - CERTBOT_EMAIL=${SYSADMIN_EMAIL}
      - SSL_TYPE=${SSL_TYPE:-letsencrypt}
      - SENTRY_ORG_SUBDOMAIN=${SENTRY_ORG_SUBDOMAIN:-o130137}
    ports:
      - "${HTTP_PORT:-80}:80"
      - "${HTTPS_PORT:-443}:443"
....

  enketo:
    environment:
      - DOMAIN=${DOMAIN}
      - HTTPS_PORT=${UPSTREAM_HTTPS_PORT:-443}



A URL call is failing as per the Developer tools

POST   https://survey.xxx.yyyu/-/transform/xform/XXXXXXXXXXXXXXXXXXXXXXXXXXX

Status  504
VersionHTTP/2
Transferred338 B (160 B size)
Referrer Policysame-origin
DNS ResolutionSystem

The reverse proxy is getting a "gateway Timed Out" from the enketo/ Collect server

I have tried various combinations of ports in .env to no avail

Further, I have logged to Reverse proxy Server when trying to edit a specific submission ID. I am getting following timeouts
.env

HTTP_PORT=80
HTTPS_PORT=443

CLIENT_USER_IP_ADD - "GET /v1/projects/7/forms/FORM___NAME/submissions/uuid%3A80ebee26-XXXXXXXXXXXXXXXXXXXXXXXXa1b31fad8a42/edit HTTP/2.0" 302 696 "https://survey.xxx.yyyu/" 

CLIENT_USER_IP_ADD - - [05/Dec/2023:16:11:05 +0530] "GET /-/edit/HmXXXXXXXXXXXXXXXXXXq6T6?instance_id=uuid:80ebee26-d29e-XXXXXXXXXXXXXXXXXXXXXXXa1b31fad8a42&return_url=https%3A%2F%2Fsurvey.xxx.yyyu%2F%23%2Fprojects%2F7%2Fforms%2FFORM___NAME%2Fsubmissions%2Fuuid%3A80ebee26-XXXXXXXXXXXXXXXXXXXXXXXXa1b31fad8a42 HTTP/2.0" 304 0 "https://survey.xxx.yyyu/" 

CLIENT_USER_IP_ADD -  "GET /-/fonts/OpenSans-Regular-webfont.woff HTTP/2.0" 304 0 "https://survey.xxx.yyyu/-/edit/HmXXXXXXXXXXXXXXXXXXq6T6?instance_id=uuid:80ebee26-d29e-XXXXXXXXXXXXXXXXXXXXXXXa1b31fad8a42&return_url=https%3A%2F%2Fsurvey.xxx.yyyu%2F%23%2Fprojects%2F7%2Fforms%2FFORM___NAME%2Fsubmissions%2Fuuid%3A80ebee26-XXXXXXXXXXXXXXXXXXXXXXXXa1b31fad8a42" 

CLIENT_USER_IP_ADD - - "GET /-/fonts/fontawesome-webfont.woff?v=4.6.2 HTTP/2.0" 304 0 "https://survey.xxx.yyyu/-/edit/HmXXXXXXXXXXXXXXXXXXq6T6?instance_id=uuid:80ebee26-d29e-XXXXXXXXXXXXXXXXXXXXXXXa1b31fad8a42&return_url=https%3A%2F%2Fsurvey.xxx.yyyu%2F%23%2Fprojects%2F7%2Fforms%2FFORM___NAME%2Fsubmissions%2Fuuid%3A80ebee26-XXXXXXXXXXXXXXXXXXXXXXXXa1b31fad8a42" 

CLIENT_USER_IP_ADD -  "GET /-/css/theme-kobo.css HTTP/2.0" 304 0 "https://survey.xxx.yyyu/-/edit/HmXXXXXXXXXXXXXXXXXXq6T6?instance_id=uuid:80ebee26-d29e-XXXXXXXXXXXXXXXXXXXXXXXa1b31fad8a42&return_url=https%3A%2F%2Fsurvey.xxx.yyyu%2F%23%2Fprojects%2F7%2Fforms%2FFORM___NAME%2Fsubmissions%2Fuuid%3A80ebee26-XXXXXXXXXXXXXXXXXXXXXXXXa1b31fad8a42" 

CLIENT_USER_IP_ADD -  "GET /-/js/build/enketo-webform-edit.js HTTP/2.0" 304 0 "https://survey.xxx.yyyu/-/edit/HmXXXXXXXXXXXXXXXXXXq6T6?instance_id=uuid:80ebee26-d29e-XXXXXXXXXXXXXXXXXXXXXXXa1b31fad8a42&return_url=https%3A%2F%2Fsurvey.xxx.yyyu%2F%23%2Fprojects%2F7%2Fforms%2FFORM___NAME%2Fsubmissions%2Fuuid%3A80ebee26-XXXXXXXXXXXXXXXXXXXXXXXXa1b31fad8a42" 

CLIENT_USER_IP_ADD - -"GET /-/fonts/OpenSans-Bold-webfont.woff HTTP/2.0" 304 0 "https://survey.xxx.yyyu/-/edit/HmXXXXXXXXXXXXXXXXXXq6T6?instance_id=uuid:80ebee26-d29e-XXXXXXXXXXXXXXXXXXXXXXXa1b31fad8a42&return_url=https%3A%2F%2Fsurvey.xxx.yyyu%2F%23%2Fprojects%2F7%2Fforms%2FFORM___NAME%2Fsubmissions%2Fuuid%3A80ebee26-XXXXXXXXXXXXXXXXXXXXXXXXa1b31fad8a42" 

CLIENT_USER_IP_ADD - "GET /-/css/theme-kobo.print.css HTTP/2.0" 200 2382 "https://survey.xxx.yyyu/-/edit/HmXXXXXXXXXXXXXXXXXXq6T6?instance_id=uuid:80ebee26-d29e-XXXXXXXXXXXXXXXXXXXXXXXa1b31fad8a42&return_url=https%3A%2F%2Fsurvey.xxx.yyyu%2F%23%2Fprojects%2F7%2Fforms%2FFORM___NAME%2Fsubmissions%2Fuuid%3A80ebee26-XXXXXXXXXXXXXXXXXXXXXXXXa1b31fad8a42" 

CLIENT_USER_IP_ADD - "GET /-/locales/build/en/translation-combined.json HTTP/2.0" 304 0 "https://survey.xxx.yyyu/-/edit/HmXXXXXXXXXXXXXXXXXXq6T6?instance_id=uuid:80ebee26-d29e-XXXXXXXXXXXXXXXXXXXXXXXa1b31fad8a42&return_url=https%3A%2F%2Fsurvey.xxx.yyyu%2F%23%2Fprojects%2F7%2Fforms%2FFORM___NAME%2Fsubmissions%2Fuuid%3A80ebee26-XXXXXXXXXXXXXXXXXXXXXXXXa1b31fad8a42" 

CLIENT_USER_IP_ADD - "GET /-/submission/HmXXXXXXXXXXXXXXXXXXq6T6?enketoId=HmXXXXXXXXXXXXXXXXXXq6T6&instanceId=uuid%3A80ebee26-XXXXXXXXXXXXXXXXXXXXXXXXa1b31fad8a42 HTTP/2.0" 304 0 "https://survey.xxx.yyyu/-/edit/HmXXXXXXXXXXXXXXXXXXq6T6?instance_id=uuid:80ebee26-d29e-XXXXXXXXXXXXXXXXXXXXXXXa1b31fad8a42&return_url=https%3A%2F%2Fsurvey.xxx.yyyu%2F%23%2Fprojects%2F7%2Fforms%2FFORM___NAME%2Fsubmissions%2Fuuid%3A80ebee26-XXXXXXXXXXXXXXXXXXXXXXXXa1b31fad8a42" 

CLIENT_USER_IP_ADD - "POST /-/transform/xform/HmXXXXXXXXXXXXXXXXXXq6T6 HTTP/2.0" 504 160 "https://survey.xxx.yyyu/-/edit/HmXXXXXXXXXXXXXXXXXXq6T6?instance_id=uuid:80ebee26-d29e-XXXXXXXXXXXXXXXXXXXXXXXa1b31fad8a42&return_url=https%3A%2F%2Fsurvey.xxx.yyyu%2F%23%2Fprojects%2F7%2Fforms%2FFORM___NAME%2Fsubmissions%2Fuuid%3A80ebee26-XXXXXXXXXXXXXXXXXXXXXXXXa1b31fad8a42" 

So the primary error is the 504 Gateway Timeout that is happening

Looked into logs on nginx

docker compose logs nginx  --tail 50 -f | grep a66ef3669d8e

I am seeing following 504 error

central-nginx-1  | My.Reverse.Proxy.P- - [05/Dec/2023:11:22:29 +0000] "POST /-/transform/xform/XXXXXXXXXXXXXXXXXXXXXXXX HTTP/1.0" 504 160 "https://survey.xxx.yyyu/-/edit/Ulp7SPsyJzrUGN8aUXmBjiJzeB60xTp?instance_id=uuid:XXXXXXXXXXx-XXXX-XXXX-XXXX-a66ef3669d8e&return_url=https%3A%2F%2Fsurvey.xxx.yyyu%2F%23%2Fprojects%2F7%2Fforms%2FORMS%2Fsubmissions%2Fuuid%XXXXXXXXXXx-XXXX-XXXX-XXXX-a66ef3669d8e" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0" "My.Client.IP.Address"

I have also disabled the UFW on local VM and that did not help

Dear community members,
Has anyone faced this issue or similar? How were you able to resolve it?