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

Allow CodeKit to terminate SSL/TLS #603

Open
njones opened this issue Feb 11, 2016 · 2 comments
Open

Allow CodeKit to terminate SSL/TLS #603

njones opened this issue Feb 11, 2016 · 2 comments

Comments

@njones
Copy link

njones commented Feb 11, 2016

I have a project that needs HTTPS in order for me to test locally. Is it possible to have an option in CodeKit to add a server .pem file and a private .key file so that CodeKit can terminate SSL and the proxy server can serve HTTPS?

The use case I have is:
I'm using websockets from another domain, but those websockets must be in HTTPS (i.e. wss://websocket.example.com). This means that even though I can run my external server on my machine as HTTP, I would still need for the CodeKit proxy server to run as HTTPS. I have used my hosts file to map a domain (i.e. localhost.example.com) to localhost. So, if I could add an example.com .pem file and the corresponding private.key certificate to the CodeKit proxy server, it could serve secure https://localhost.example.com traffic. The browser could then connect to the other websocket server in the same domain securely without failing.

One way of implementing this could be:
An option under "Browser Refreshing" where you could specify a server.pem file and a private.key file (or even drop in the certificate text -- eliminating an extra file), then if those fields were filled in CodeKit could use those certificates to terminate SSL for that project.

I think this may be related to issue #462

@bdkjones
Copy link
Owner

Yea, I mean this is definitely doable but the problem is handling the certificates. Everything in project settings must be syncable across machines; you can set a pem file path there that isn't going to exist on another Mac where the project is added. So your certificates would essentially have to be in the project.

Sent from my iPhone

On Feb 11, 2016, at 03:45, Nika Jones [email protected] wrote:

I have a project that needs HTTPS in order for me to test locally. Is it possible to have an option in CodeKit to add a server .pem file and a private .key file so that CodeKit can terminate SSL and the proxy server can serve HTTPS?

The use case I have is:

I'm using websockets from another domain, but those websockets must be in HTTPS (i.e. wss://websocket.example.com). This means that even though I can run my external server on my machine as HTTP, I would still need for the CodeKit proxy server to run as HTTPS. I have used my hosts file to map a domain (i.e. localhost.example.com) to localhost. So, if I could add an example.com .pem file and the corresponding private.key certificate to the CodeKit proxy server, it could serve secure https://localhost.example.com traffic. The browser could then connect to the other websocket server in the same domain securely without failing.

One way of implementing this could be:

An option under "Browser Refreshing" where you could specify a server.pem file and a private.key file (or even drop in the certificate text -- eliminating an extra file), then if those fields were filled in CodeKit could use those certificates to terminate SSL for that project.

I think this may be related to issue #462


Reply to this email directly or view it on GitHub.

@njones
Copy link
Author

njones commented Feb 18, 2016

FYI: Here's a small go proxy-proxy that I made to terminate SSL for my project. The defaults are for a CodeKit based project. Maybe someone else could use it too: https://gist.github.com/njones/bdcbf96699e021250d0d

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