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

No support for self-signed certs #205

Closed
alexjacobson95 opened this issue Feb 4, 2023 · 1 comment
Closed

No support for self-signed certs #205

alexjacobson95 opened this issue Feb 4, 2023 · 1 comment

Comments

@alexjacobson95
Copy link

Trying to deploy this on my local infrastructure, I have my own CA which I use to host awesome tools like this at my house. I deployed this behind a TLS offloading proxy and everything loaded up perfectly right up until I hit run and:

fail to send request to playground server POST "<internal-url>/fmt": x509: certificate signed by unknown authority

Looking through the code I am guessing since the front-end is using WASM, even though my browser trusts my CA (I can load the root page without any TLS errors), the WASM binary doesn't have access to the CA file to verify the request.

Not sure the best solution here. I am not familiar enough with WASM to know how to fix this. Normally I would say just make an environment variable that you can load the CA bundle in via docker, but I think the CA bundle actually needs to be compiled into the WASM binary during the image build. Not sure the best way to accomplish that.

If someone points me in the right direction I would be more than happy to try and put a PR up. Thanks for the awesome project!

@alexjacobson95 alexjacobson95 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 4, 2023
@x1unix
Copy link
Owner

x1unix commented Feb 4, 2023

@alexjacobson95 before executing any code or compiling a WASM binary on server side, you code runs through goimports.

Go imports is handled by a back-end which sends request to original Go playground (see pkg/goplay/client.go:78 ).

You can specify a custom Go playground server URL with APP_PLAYGROUND_URL environment variable (see the wiki)

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