@@ -89,6 +89,9 @@ const (
8989 defaultWatchdog = true
9090 defaultInvidiousInstance = "yewtu.be"
9191 defaultWebAuthn = false
92+ defaultDisableFeverAPI = false
93+ defaultDisableGoogleReaderAPI = false
94+ defaultDisableAPI = false
9295)
9396
9497var defaultHTTPClientUserAgent = "Mozilla/5.0 (compatible; Miniflux/" + version .Version + "; +https://miniflux.app)"
@@ -179,6 +182,9 @@ type options struct {
179182 invidiousInstance string
180183 mediaProxyPrivateKey []byte
181184 webAuthn bool
185+ disableFeverAPI bool
186+ disableGoogleReaderAPI bool
187+ disableAPI bool
182188}
183189
184190// NewOptions returns Options with default values.
@@ -259,6 +265,9 @@ func NewOptions() *options {
259265 invidiousInstance : defaultInvidiousInstance ,
260266 mediaProxyPrivateKey : crypto .GenerateRandomBytes (16 ),
261267 webAuthn : defaultWebAuthn ,
268+ disableFeverAPI : defaultDisableFeverAPI ,
269+ disableGoogleReaderAPI : defaultDisableGoogleReaderAPI ,
270+ disableAPI : defaultDisableAPI ,
262271 }
263272}
264273
@@ -666,6 +675,21 @@ func (o *options) WebAuthn() bool {
666675 return o .webAuthn
667676}
668677
678+ // DisableGoogleReaderAPI returns true if the Google Reader API should be disabled
679+ func (o * options ) DisableGoogleReaderAPI () bool {
680+ return o .disableGoogleReaderAPI
681+ }
682+
683+ // DisableFeverAPI returns true if the Fever API should be disabled
684+ func (o * options ) DisableFeverAPI () bool {
685+ return o .disableFeverAPI
686+ }
687+
688+ // DisableAPI returns true if the API should be disabled
689+ func (o * options ) DisableAPI () bool {
690+ return o .disableAPI
691+ }
692+
669693// FilterEntryMaxAgeDays returns the number of days after which entries should be retained.
670694func (o * options ) FilterEntryMaxAgeDays () int {
671695 return o .filterEntryMaxAgeDays
@@ -780,6 +804,9 @@ func (o *options) SortedOptions(redactSecret bool) []*option {
780804 "YOUTUBE_API_KEY" : redactSecretValue (o .youTubeApiKey , redactSecret ),
781805 "YOUTUBE_EMBED_URL_OVERRIDE" : o .youTubeEmbedUrlOverride ,
782806 "WEBAUTHN" : o .webAuthn ,
807+ "DISABLE_FEVER_API" : o .disableFeverAPI ,
808+ "DISABLE_GOOGLEREADER_API" : o .disableGoogleReaderAPI ,
809+ "DISABLE_API" : o .disableAPI ,
783810 }
784811
785812 keys := make ([]string , 0 , len (keyValues ))
0 commit comments