Closed kishansagathiya closed 6 years ago
Add SSL support to your local proxy implementation.I tried this blog
Add your certificate and key in the root of jenkins-proxy directory (something like ~/go/fabric8/src/github.com/fabric8-services/fabric8-jenkins-proxy)
Replace this line https://github.com/fabric8-services/fabric8-jenkins-proxy/blob/563c04673915f119f462dfd1b228183a9349ccb5/cmd/fabric8-jenkins-proxy/main.go#L163 with
if err := srv.ListenAndServeTLS("server.crt", "server.key"); err != nil {
log.Errorf("Could not start proxy" + err.Error())
Of course, you will have to change it back when you push.
For visual entertainment
If you know a better way to run proxy locally, please suggest.
Isn't easier to just enable TLS if server.crt
and server.key
exists in the root?
Asking maintainers to change code back before pushing may not be a good idea
sn't easier to just enable TLS if server.crt and server.key exists in the root?
Didn't know about this. Let me look into it.
@kishansagathiya I agree with @gastaldi 's idea .
I am not sure if we must enable https automatically if certs are found,I would rather be explicit about this though a flag e.g. JC_DEV_MODE=true
or JC_ENABLE_HTTPS=true
. The /scripts/setupLocalProxy.sh
can generate the certs if missing and the env
method can set the enable-https flag.
This could be either SSL support https://github.com/fabric8-services/fabric8-jenkins-proxy/issues/174 Or using dev cluster, Do whatever is required. We shouldn't be needing prod-preview to test our changes