hocus-dev / hocus

🪄 Spin up ready-to-code, disposable dev environments on your own servers. Self-hosted alternative to Gitpod and Github Codespaces.
https://hocus.dev
MIT License
3.23k stars 82 forks source link

HTTPS Support #144

Closed CoolCoderSJ closed 8 months ago

CoolCoderSJ commented 8 months ago

❓ Questions/Help/Support

Hi,

Is it possible to use Hocus with https? I have a domain with HSTS forced (.dev) so http isn't an option for me. I basically have this domain pointed to a machine with caddy on it which terminates the TLS then proxies the request to the hocus server. However, when trying to login after Keycloak redirects back to the main portal, I get "Bad Request" and the logs show:

hocus-local-hocus-ui-1              | BadRequestError: unexpected iss value, expected http://<domain_name>:4200/realms/hocus, got: https://<domain_name>:4200/realms/hocus
hocus-local-hocus-ui-1              |     at /app/node_modules/express-openid-connect/middleware/auth.js:121:19
hocus-local-hocus-ui-1              |     at runMicrotasks (<anonymous>)
hocus-local-hocus-ui-1              |     at processTicksAndRejections (node:internal/process/task_queues:96:5)

Is there a way to have hocus accept the https version of the domain even though the body may not be encrypted?

CoolCoderSJ commented 8 months ago

nevermind, found out about the OIDC_ISSUER_BASE_URL environment variable