-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
httpcaddyfile: Add preferred_chains
global option and issuer
subdirective
#4192
httpcaddyfile: Add preferred_chains
global option and issuer
subdirective
#4192
Conversation
preferred_chains
global option and tls
subdirective
preferred_chains
global option and tls
subdirectivepreferred_chains
global option and issuer
subdirective
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty good. The only nit I have is that the parsing code is basically identical between that of the issuer config and the global option.
Can you consolidate that?
Since package httpcaddyfile
imports package caddytls
, maybe the parsing code for this could be in caddytls
as its own function.
You're right. I'll have a look at it and send in an update to the PR when I've changed that. |
04102d1
to
7f22cd3
Compare
Ok, I managed to consolidate most of the stuff into a I encountered some issues on the way, so I don't know if the code is as elegant as it could be (comments welcome on this too). Did some testing and everything seemed to still work like before the "consolidation". |
7f22cd3
to
9319c19
Compare
Great, looks good now! Thank you very much! Hope you'll contribute again. |
Thanks! This has been a great way to learn more about how Caddy works and to code with Go (which has been on my to-do list for too long 😄). |
This PR adds support for the
preferred_chains
option in the Caddyfile; both as an option for the ACME issuer and as a global option. If merged, this PR would resolve #4185.The structure is the following:
The Caddyfile adapt tests added in this branch show how the options can be used both "locally" and globally. More details can be found in the issue linked above.
And, I'm of course happy to answer any questions that might arise 🙂