1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

Make HTTP Client timeout and max body size configurable

This commit is contained in:
Frédéric Guillot 2019-06-02 07:13:35 -07:00 committed by fguillot
parent 228862fefa
commit bb720c87c1
5 changed files with 117 additions and 33 deletions

View file

@ -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
}