Numbered backends will only work if the domain has a number at the end, for example:
inv1.nadeko.net will redirect to backend 1
inv2.nadeko.net will redirect to backend 2
2inv.nadeko.net will use cookies
nadeko1.net will redirect to backend 1
The number of the backend in the domain should be always on the end of it to be able to use numbered backends.
https://github.com/jgaskins/redis
It's faster and in active development, old one gave me this using a TCP
connection:
test 5.94k (168.34µs) (±56.73%) 144B/op fastest
test 5.11k (195.76µs) (±58.89%) 144B/op fastest
test 5.48k (182.33µs) (±73.39%) 144B/op fastest
test 3.42k (292.56µs) (±66.19%) 144B/op fastest
meanwhile, the jgaskins/redis one gives:
test 6.96k (143.66µs) (±58.73%) 96.0B/op fastest
test 6.36k (157.16µs) (±55.95%) 96.0B/op fastest
test 7.06k (141.65µs) (±57.03%) 96.0B/op fastest
This will make invidious easier to maintain and escalate without the need of an overcomplicated reverse proxy configuration and multiple invidious instances with each one with a different configuration (in this case, invidious companion)
* add support for invidious companion
* redirect latest_version and dash manifest to invidious companion
* fix Shadowing outer local variable `response`
* fixing condition for Content-Security-Policy
* throw error if inv_sig_helper and invidious_companion used same time
* Use sample instead of Random.rand
Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com>
* Remove debug puts functions
Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com>
* modify the description for config.example.yaml about invidious companion
* move config checks for invidious companion
* separate invidious_companion logic + better config.yaml config
* fixing "end" misplacement
* fix linting + use .empty?
* crystal handle decompression already by itself
* fix download function when invidious companion used
* fix linting
* invidious companion always used so always add CSP and redirect latest_version
* apply all the suggestions + rework invidious_companion parameter
* format watch.cr
* fix ameba Redundant use of `Object#to_s` in interpolation
* add ability for invidious companion to check request from invidious
* Better document private_url and public_url
* Better doc for invidious_companion_key
* !empty? to present?
* skip proxy for invidious companion
* fixing format
* missing ,
* add companion pooling http
* fix: don't use http proxy when sending requests to companion
* fix: logic where we want to have the invidious logic if companion is not used
* chore: remove baseurl usage from invidious companion
* chore: change from inv-sig-helper to companion for required playback
* fix: use puts + add warning for inv-sig-helper deprecated
---------
Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com>
fix: rename subscriptions materialized view of the user too
remove materialized views from username change
fix: downcase username and limit username lenght (from routes/login.cr)
Users that changed their username to something like `User`, were unable
to login because the username is downcased on routes/login.cr
Videos that return CONTENT_CHECK_REQUIRED do not include the
microformat JSON object literal on them. I think it's better to handle
microformat as nil instead of raising if microformat is not present.