mirror of
https://github.com/miniflux/v2.git
synced 2025-09-30 19:22:11 +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:
parent
10b2b36895
commit
0e28c0610a
5 changed files with 73 additions and 1 deletions
|
@ -49,6 +49,7 @@ func Serve(router *mux.Router, store *storage.Storage) {
|
|||
sr := router.PathPrefix("/reader/api/0").Subrouter()
|
||||
sr.Use(middleware.handleCORS)
|
||||
sr.Use(middleware.apiKeyAuth)
|
||||
sr.Use(middleware.maybeUnauthorizedGoogleReader)
|
||||
sr.Methods(http.MethodOptions)
|
||||
sr.HandleFunc("/token", handler.tokenHandler).Methods(http.MethodGet).Name("Token")
|
||||
sr.HandleFunc("/edit-tag", handler.editTagHandler).Methods(http.MethodPost).Name("EditTag")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue