-
Notifications
You must be signed in to change notification settings - Fork 22
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
specify minimum tls version #94
Conversation
Thanks for the contribution @Freyert. I think we should have the tls version be configurable as 1.2 is still supported. I suggest adding a |
@guyfedwards agreed! I'll work it in this weekend. |
@@ -138,6 +143,13 @@ func (c *Config) Load() error { | |||
c.Feeds = fileConfig.Feeds | |||
c.Openers = fileConfig.Openers | |||
|
|||
if fileConfig.HTTPOptions != nil { | |||
if _, err := TLSVersion(fileConfig.HTTPOptions.MinTLSVersion); err != nil { | |||
return err |
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 doesn't seem to work as expected. I get unhelpful output like this if I set it to some unsupported string:
flax% go run cmd/nom/main.go
Usage:
main [OPTIONS]
Application Options:
-v, --verbose Show verbose logging
-n, --number= Number of results to show
-p, --pager= Pager to use for longer output. Set to false for no pager
--config-path= Location of config.yml
-f, --feed= Feed(s) URL(s) for preview
--version Display version information
Help Options:
-h, --help Show this help message
exit status 1
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.
What I would expect is to see a "config error" message and exit status 1.
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.
if you run go run cmd/nom/main.go -v
do you see the error? This is a gotcha with the --verbose
flag showing errors. Needs to be refactored out at some point
@Freyert are you happy with this? Looks good to me |
ping @Freyert |
👍 it's good for me. |
Thanks @Freyert |
I kept receiving 403s from https://fs.blog/feed/ . It turns out that it's probably because cloudflare blocks you unless you specify a minimum TLS version.
TLS 1.3 might be too high, but it solved my problem.