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:
parent
c531be8780
commit
e643effefa
16 changed files with 33 additions and 52 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue