mirror of
https://github.com/miniflux/v2.git
synced 2025-10-05 19:31:01 +00:00
Merge 47f3ebed1d
into 4eff9129ab
This commit is contained in:
commit
8cfeaa7716
7 changed files with 27 additions and 5 deletions
|
@ -90,6 +90,7 @@ const (
|
|||
defaultWatchdog = true
|
||||
defaultInvidiousInstance = "yewtu.be"
|
||||
defaultWebAuthn = false
|
||||
defaultDisableAPI = false
|
||||
)
|
||||
|
||||
var defaultHTTPClientUserAgent = "Mozilla/5.0 (compatible; Miniflux/" + version.Version + "; +https://miniflux.app)"
|
||||
|
@ -184,6 +185,7 @@ type options struct {
|
|||
invidiousInstance string
|
||||
mediaProxyPrivateKey []byte
|
||||
webAuthn bool
|
||||
API bool
|
||||
}
|
||||
|
||||
// NewOptions returns Options with default values.
|
||||
|
@ -264,6 +266,7 @@ func NewOptions() *options {
|
|||
invidiousInstance: defaultInvidiousInstance,
|
||||
mediaProxyPrivateKey: crypto.GenerateRandomBytes(16),
|
||||
webAuthn: defaultWebAuthn,
|
||||
API: !defaultDisableAPI,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -677,6 +680,11 @@ func (o *options) WebAuthn() bool {
|
|||
return o.webAuthn
|
||||
}
|
||||
|
||||
// EnableAPI returns true if API is enabled
|
||||
func (o *options) EnableAPI() bool {
|
||||
return o.API
|
||||
}
|
||||
|
||||
// FilterEntryMaxAgeDays returns the number of days after which entries should be retained.
|
||||
func (o *options) FilterEntryMaxAgeDays() int {
|
||||
return o.filterEntryMaxAgeDays
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue