Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query - Can not input SQL query over ingress #713

Open
coduzo opened this issue Feb 22, 2024 · 5 comments
Open

Query - Can not input SQL query over ingress #713

coduzo opened this issue Feb 22, 2024 · 5 comments

Comments

@coduzo
Copy link

coduzo commented Feb 22, 2024

I have depoyed pgweb in kubernetes. Pgweb work well but there is one issue.
When I connect to pgweb container with port-forward to localhost:8081 everything works for me.
But when I use a public ingress with a oauth proxy then I can not write SQL queries in Query tab.
It is not possible to inset text here. All other features are working as expected.
In the pgweb logfile there is no message which helps to find the root cause for this issue.

@sosedoff
Copy link
Owner

Don't think you're going to find anything in the pgweb logs as those are only related to the API calls made by the UI.
However, on the UI side you can see any javascript/asset loading errors. Maybe something in Kube stack prevents all javascripts components (like code editor) from loading correctly which results in broken input. That's just my hunch but i've yet to see an error like this myself.

Happy to help if know how to reproduce this issue reliably

@coduzo
Copy link
Author

coduzo commented Mar 12, 2024

thank you for your message. The issue may be related to the content security policy for the kube ingress.
See console logs.
grafik

@sosedoff
Copy link
Owner

Can you provide a bit more context on your kube setup? I've deployed Pgweb on k8s several times, with ingresses and cert-manager and didnt hit this issue, so i'm suspecting you may have some additional rules in place?

@coduzo
Copy link
Author

coduzo commented Mar 13, 2024

In our case, the k8s ingress adds HTTP CSP header: "content-security-policy: default-src 'self'"
Think this is root cause for the issue. I finally found a workaround for me: Just install a browser extension which disables CSP header. Maybe you can reproduce this issue now.

@sosedoff
Copy link
Owner

Good to know, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants