fix(backend switcher): pass referer in URL
Some checks are pending
Build and release container directly from master / release (push) Waiting to run
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.12.1, true) (push) Waiting to run
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.13.2, true) (push) Waiting to run
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.14.0, true) (push) Waiting to run
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.15.0, true) (push) Waiting to run
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (nightly, false) (push) Waiting to run
Invidious CI / build-docker (push) Waiting to run
Invidious CI / build-docker-arm64 (push) Waiting to run
Invidious CI / lint (push) Waiting to run

Closes https://git.nadeko.net/Fijxu/invidious/issues/109

This will allow browsers that by default set the referer to the same
page to tracking via the referer header. IceCat browser does this.
This commit is contained in:
Fijxu
2025-05-08 20:22:29 -04:00
parent 4e2f59ba37
commit caa2273bf2
2 changed files with 3 additions and 2 deletions

View File

@@ -2,7 +2,7 @@
module Invidious::Routes::BackendSwitcher
def self.switch(env)
referer = get_referer(env)
referer = get_referer(env, unroll: false)
backend_id = env.params.query["backend_id"]?.try &.to_i
if backend_id.nil?