1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-11 17:51:01 +00:00

feat: combine feed icon handlers to use only externalIconID

This commit is contained in:
Frédéric Guillot 2025-03-28 14:20:53 -07:00
parent c531be8780
commit e643effefa
16 changed files with 33 additions and 52 deletions

View file

@ -63,6 +63,13 @@ func (m *middleware) handleUserSession(next http.Handler) http.Handler {
func (m *middleware) handleAppSession(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if mux.CurrentRoute(r).GetName() == "feedIcon" {
// Skip app session handling for the feed icon route to avoid unnecessary session creation
// when fetching feed icons.
next.ServeHTTP(w, r)
return
}
var err error
session := m.getAppSessionValueFromCookie(r)
@ -154,6 +161,7 @@ func (m *middleware) isPublicRoute(r *http.Request) bool {
"oauth2Redirect",
"oauth2Callback",
"appIcon",
"feedIcon",
"favicon",
"webManifest",
"robots",