diff options
author | 2024-03-03 23:39:24 +0100 | |
---|---|---|
committer | 2024-03-03 20:25:47 -0800 | |
commit | 9fe99ce7fa99c3b1acd9b7894fcc8350e2564d97 (patch) | |
tree | 9fa6101055ac0f780fbcd79b61bf50dfa71643e2 /internal/ui/middleware.go | |
parent | b8df6c31a0e63a3ecdfe048f3181603074a650d5 (diff) | |
download | v2-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