sosedoff / pgweb

Cross-platform client for PostgreSQL databases
https://sosedoff.github.io/pgweb
MIT License
8.47k stars 716 forks source link

TLS Failure #705

Closed gautada closed 6 months ago

gautada commented 6 months ago

I am at my wits end and I am pretty sure this is not the correct forum but any directional help will be greatly appreciated.

Environment:

I have pgweb running as container in a kubernetes pod. Full deployment with ingress, services, etc.

Issue:

The deployment works fine with zero issues until I enable TLS in the ingress config. Once tis is turned on assets are not loaded. The '/' is working so the html is downloaded. Some assets (the CSS files) are downloaded by the client no problem but non of the JS files are downloaded. The only difference is the TLS change in ingress:

ingress.yml:

...
spec:
  tls:
  - hosts:
      - fqdn.host.tld
  ingressClassName: public
  rules:
...

For debugging I have removed annotations in the ingress file

So when requesting https://fqdn.domain.tld/ in the browser any js asset fails to download. The request returns NULL. No HTTP response, no HTTP response code, just NULL.

Debugging:

  1. Everything works when not using the tis section in the ingress.yml (i.e. http://fqd.domain.tld). This proves the deployment chain ingress->service->pod is working and the pgweb container is working just fine.
  2. With TLS all asset paths are accessible. I can cURL all URLS (i.e. https://fqdn.domain.tld/, https://fqdn.domain.tld/static/css/*.css, https://fqdn.domain.tld/static/js/*.js) are all directly accessible.
  3. When requesting https://fqdn.domain.tld/ only the requests for / or static/css/*.css show up in the ingress log. It seems like the javascript requests are not in log.
  4. Assuming this is some browser issue default is Safari, I ran in Firefox and Chrome. Same issue in each browser. FAILED
  5. Assuming this may be browser security setting I turned disabled Developer Settings...>Disable cross-origin restrictions FAILED.
  6. I have attempted to adjust the Githubissues.
  7. Githubissues is a development platform for aggregating issues.