Open scola84 opened 4 months ago
The behavior you're seeing is due to how Kubernetes port-forward works and how Codespaces handles secure connections.
If you want to access your app via https://localhost from your host machine, you would need to set up a local SSL/TLS proxy on your host machine that forwards traffic to the Codespaces URL. This would involve generating a self-signed SSL certificate, configuring the proxy to use this certificate, and adding the certificate to your host machine's trusted certificate store. This is a complex task and may not be feasible depending on your situation.
Alternatively, you could consider using a service like ngrok or localtunnel to expose your local web server to the internet with a secure connection. These services provide a public URL that you can use to access your local web server from any device. However, please be aware that these services may have costs associated with them, and exposing your local web server to the internet can have security implications.
When I run
kubectl port-forward -n ingress-nginx services/ingress-nginx-controller 80:80
the forwarded address is
127.0.0.1:80
, but when I runkubectl port-forward -n ingress-nginx services/ingress-nginx-controller 443:443
the forwarded address is
https://CODESPACENAME-443.app.github.dev/
I would like to be able to use
https://localhost
to access my app from the host machine (e.g. a browser) with a secure connection, but because of the observed behavior of the codespace this is not possible.