diff options
author | Frédéric Guillot <fred@miniflux.net> | 2019-06-02 07:13:35 -0700 |
---|---|---|
committer | fguillot <fred@miniflux.net> | 2019-06-02 07:29:56 -0700 |
commit | bb720c87c191efe36a328d95a918f75df51d4976 (patch) | |
tree | 35b6e87ddf5c0b37208f489fd6680075f269a3ef /config/parser.go | |
parent | 228862fefaa645026caa483ffe9993bf8c00b22e (diff) |
Make HTTP Client timeout and max body size configurable
Diffstat (limited to 'config/parser.go')
-rw-r--r-- | config/parser.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/config/parser.go b/config/parser.go index 996d0a8..b2ed2e7 100644 --- a/config/parser.go +++ b/config/parser.go @@ -45,6 +45,8 @@ func parse() (opts *Options, err error) { opts.batchSize = getIntValue("BATCH_SIZE", defaultBatchSize) opts.archiveReadDays = getIntValue("ARCHIVE_READ_DAYS", defaultArchiveReadDays) opts.proxyImages = getStringValue("PROXY_IMAGES", defaultProxyImages) + opts.createAdmin = getBooleanValue("CREATE_ADMIN") + opts.pocketConsumerKey = getStringValue("POCKET_CONSUMER_KEY", "") opts.oauth2UserCreationAllowed = getBooleanValue("OAUTH2_USER_CREATION") opts.oauth2ClientID = getStringValue("OAUTH2_CLIENT_ID", defaultOAuth2ClientID) @@ -52,9 +54,8 @@ func parse() (opts *Options, err error) { opts.oauth2RedirectURL = getStringValue("OAUTH2_REDIRECT_URL", defaultOAuth2RedirectURL) opts.oauth2Provider = getStringValue("OAUTH2_PROVIDER", defaultOAuth2Provider) - opts.pocketConsumerKey = getStringValue("POCKET_CONSUMER_KEY", "") - - opts.createAdmin = getBooleanValue("CREATE_ADMIN") + opts.httpClientTimeout = getIntValue("HTTP_CLIENT_TIMEOUT", defaultHTTPClientTimeout) + opts.httpClientMaxBodySize = int64(getIntValue("HTTP_CLIENT_MAX_BODY_SIZE", defaultHTTPClientMaxBodySize) * 1024 * 1024) return opts, nil } |