Redirect loop after setting up https with a self signed certificate

I followed the tutorial to the letter and made a functioning jupyter-hub instance with the helm chart. I setup a hostname on /etc/hosts so I didn’t need to write the ip every time I entered the server. Later I followed the guide to setup https (because I thought it was necessary for jupyter-hub to enable pam authentication). I used a self-signed certificate to test the setup however when trying to access the jupyter-hub url the browser enters a redirect loop and fails. Do you guys have any idea what could be causing that?

config.yaml

proxy:
  https:
    enabled: true
    type: manual
    manual:
      cert: |
...
    key: |
...

/etc/hosts

myip jupyterhub-homol.mydomain

I created the self-sigined certificate with:

openssl req -x509 -sha256 -days 356 -nodes -newkey rsa:2048  -subj "/CN=jupyterhub-homol.mydomain/C=BR/L=Sergipe" -keyout rootCA.key -out rootCA.crt

I apply the helm chart upgrades with:

 helm upgrade --cleanup-on-fail --install "release-1" jupyterhub/jupyterhub --namespace mynamespace --version 2.0.0 --values config.yaml

The hub doesn’t seem to have much useful information:

[I 2023-06-26 12:21:05.508 JupyterHub log:186] 200 GET /hub/api/ (jupyterhub-idle-culler@::1) 85.14ms 2023-06-26T09:21:05.516488699-03:00
[I 2023-06-26 12:21:05.516 JupyterHub log:186] 200 GET /hub/api/users?state=[secret] (jupyterhub-idle-culler@::1) 6.95ms 2023-06-26T09:31:05.464863393-03:00
[I 2023-06-26 12:31:05.464 JupyterHub log:186] 200 GET /hub/api/ (jupyterhub-idle-culler@::1) 24.85ms 2023-06-26T09:31:05.473647434-03:00
[I 2023-06-26 12:31:05.473 JupyterHub log:186] 200 GET /hub/api/users?state=[secret] (jupyterhub-idle-culler@::1) 6.60ms 2023-06-26T09:41:05.444043704-03:00
[I 2023-06-26 12:41:05.442 JupyterHub log:186] 200 GET /hub/api/ (jupyterhub-idle-culler@::1) 23.08ms 2023-06-26T09:41:05.451538666-03:00
[I 2023-06-26 12:41:05.451 JupyterHub log:186] 200 GET /hub/api/users?state=[secret] (jupyterhub-idle-culler@::1) 6.01ms 

Same for the proxy log

12:41:05.165 [ConfigProxy] info: 200 GET /api/routes
12:42:05.166 [ConfigProxy] info: 200 GET /api/routes 2023-06-26T09:43:05.165862602-03:00 
12:43:05.165 [ConfigProxy] info: 200 GET /api/routes 2023-06-26T09:44:05.167086908-03:00 
12:44:05.166 [ConfigProxy] info: 200 GET /api/routes 2023-06-26T09:45:05.168097513-03:00 
12:45:05.167 [ConfigProxy] info: 200 GET /api/routes 

I removed the https settings and the problem remained. So I destroyed the release and recreated it. The problem now disappeared. Also z2jh sees to come with a self-signed certificate, so all is good.(?)