-
-
Notifications
You must be signed in to change notification settings - Fork 607
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
feat: ✨ test for ACME file over SSL, + more logging #1342
feat: ✨ test for ACME file over SSL, + more logging #1342
Conversation
I think we'd also need to modify this file:
to add
|
Looks good overall! re: adding 443 to 🤔 would we need the |
if int(status) != 200 and bool(ssl) == True: | ||
failed_hosts.append(result) | ||
# Try again, this time over SSL | ||
result = get_status(host, 443, path, file) | ||
status = result['status'] | ||
|
||
if int(status) != 200: | ||
failed_hosts.append(host) | ||
failed_hosts.append(result) |
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 reads better I think?
if int(status) != 200:
failed_hosts.append(result)
if bool(ssl) == True:
# Try again, this time over SSL
result = get_status(host, 443, path, file)
status = result['status']
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.
Sorry just realized this comment had been pending for over a month and I forgot to submit 😓
@techieshark are you still interested in finishing this? I can take it over if not. |
Closing this since it won't be compatible with #1310 |
Just finally getting back to some Trellis work… thanks @swalkinshaw for that readability suggestion; I've updated my local code with that and will use that internally until #1310 is released. |
Resolves #1340
Consider this a rough initial PR, ready for review/discussion. I'm happy to make changes as needed.
Things to consider:
ssl
config option (maybe we just recognize a potential 301 HTTP->HTTPS redirect and follow it?get_status
function, but now that it returns more than just the HTTP status, perhaps I shouldExample output
Below is an example where I've just changed the filename to force what happens when the file is inaccessible
Below is an example where
example.com
(some good host) has a typo likeexample.comuu
(extra 'uu') so we see the "-1" status in the details and the "Name or service not known" in the JSON holding the full details.