aboutsummaryrefslogtreecommitdiff
path: root/internal/ui/middleware.go
diff options
context:
space:
mode:
authorGravatar jvoisin <julien.voisin@dustri.org> 2024-03-03 23:39:24 +0100
committerGravatar Frédéric Guillot <f@miniflux.net> 2024-03-03 20:25:47 -0800
commit9fe99ce7fa99c3b1acd9b7894fcc8350e2564d97 (patch)
tree9fa6101055ac0f780fbcd79b61bf50dfa71643e2 /internal/ui/middleware.go
parentb8df6c31a0e63a3ecdfe048f3181603074a650d5 (diff)
downloadv2-9fe99ce7fa99c3b1acd9b7894fcc8350e2564d97.tar.gz
v2-9fe99ce7fa99c3b1acd9b7894fcc8350e2564d97.tar.zst
v2-9fe99ce7fa99c3b1acd9b7894fcc8350e2564d97.zip
Simplify and optimize genericProxyRewriter
- Reduce the amount of nested loops: it's preferable to search the whole page once and filter on it (even with filters that should always be false), than searching it again for every element we're looking for. - Factorize the proxying conditions into a `shouldProxy` function to reduce the copy-pasta.
Diffstat (limited to 'internal/ui/middleware.go')
0 files changed, 0 insertions, 0 deletions