1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-10-15 19:42:07 +00:00

feat(integrations): automatically disable googlereader/fever when not used #3543

When there is no user of Fever/GoogleReader, there is no need to expose their
endpoints. This reduces quite a bit the exposition surface of miniflux, while
not breaking any existing deployments, and is pretty self-contained.
This commit is contained in:
jvoisin 2025-08-02 22:58:36 +02:00
parent 10b2b36895
commit 0e28c0610a
5 changed files with 73 additions and 1 deletions

View file

@ -25,7 +25,9 @@ func Serve(router *mux.Router, store *storage.Storage) {
handler := &handler{store, router}
sr := router.PathPrefix("/fever").Subrouter()
sr.Use(newMiddleware(store).serve)
middleware := newMiddleware(store)
sr.Use(middleware.maybeUnauthorizedFever)
sr.Use(middleware.serve)
sr.HandleFunc("/", handler.serve).Name("feverEndpoint")
}