Repository navigation
Conversation
…was starting to get messy Signed-off-by: Cemah Tudae-Torboh <[email protected]>
|
@vito Can you take a look at this. I implemented your suggested changes |
vito
left a comment
There was a problem hiding this comment.
I think the validation is a bit borked. 🙂
| if !cmd.isTLSEnabled() || !cmd.LetsEncrypt.Enable { | ||
| errs = multierror.Append( | ||
| errs, | ||
| errors.New("must specify a --tls-bind-port, or --enable-lets-encrypt to use TLS "), |
There was a problem hiding this comment.
This won't work because the switch statement will run the cmd.TLSBindPort == 0 (line 1157) instead. In fact it seems like a lot of these validations are kind of awkwardly overlapping as a result of using switch. 🤔 It's really one big chained else-if.
Using a switch statement here feels like it's not aging well. It could be refactored, or you could just put a if cmd.TLSOnly in the cmd.TLSBindPort == 0 branch. I'd be fine with both; the latter is probably less work.
The error can then read must specify --tls-bind-port in order to configure --tls-only. I don't think you need to mention Let's Encrypt at all.
|
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
|
Closing due to inactivity, but feel free to reopen once you have time - thanks! |
Fixes #2958
Changes proposed in this pull request
added support for a CONCOURSE_TLS_ONLY configuration that will disable the non-TLS API listener.
** Note I had to reopen this as my other branch had a rogue unsigned commit that was getting out of hand **