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

Adds the option to skip TLS verification for a Gotify instance #544

Merged
merged 1 commit into from
May 22, 2020
Merged

Adds the option to skip TLS verification for a Gotify instance #544

merged 1 commit into from
May 22, 2020

Conversation

tammert
Copy link
Member

@tammert tammert commented May 11, 2020

Fixes #382.

Tested this with the following Gotify server using a self-signed certificate:

docker run -d -p 443:443 -v /tmp/gotify:/app/data -e GOTIFY_SERVER_SSL_ENABLED=true -e GOTIFY_SERVER_SSL_CERTFILE=/app/data/localhost.crt -e GOTIFY_SERVER_SSL_CERTKEY=/app/data/localhost.key gotify/server

With the new flag to the instance as described above:

$ ./watchtower --trace --notification-gotify-url=https://localhost:443 --notification-gotify-tls-skip-verify --notification-gotify-token=AL8lZtthYtxzSgw --notifications=gotify -R
INFO[0000] Running a one time update.
DEBU[0000] Checking containers for updated images

Without the new flag:

$ ./watchtower --trace --notification-gotify-url=https://localhost:443 --notification-gotify-token=AL8lZtthYtxzSgw --notifications=gotify --notifications-level=info -R
INFO[0000] Running a one time update.
Failed to send Gotify notification:  Post "https://localhost:443/message?token=AL8lZtthYtxzSgw": x509: certificate signed by unknown authority
DEBU[0000] Checking containers for updated images

And, of course, the notifications were received when the new flag was active :).

@simskij
Copy link
Member

simskij commented May 22, 2020

Thank you for the contribution! The only check that's failing is godacov, so I'll go ahead and merge this regardless!

@simskij simskij merged commit dccdf70 into containrrr:master May 22, 2020
@tammert tammert deleted the gotify-tls-skip-verify branch May 22, 2020 14:42
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

Successfully merging this pull request may close these issues.

Add flag to disable TLS check for all notification provider, or better allow certificate providing
2 participants