Add support for alternative domains for Invidious cookies (#5647)

* Add support for alternative domains for Invidious cookies

* check if @@secure is already true before changing it's value

* Add alternative_domains config option example
This commit is contained in:
Fijxu
2026-06-04 19:59:32 -04:00
committed by GitHub
parent 85534a988d
commit 98f4f118b2
6 changed files with 64 additions and 7 deletions

View File

@@ -151,6 +151,26 @@ db:
##
domain:
##
## List of alternative domains where the invidious instance is being served.
## This needs to be set in order to be able to login and update user preferences
## when using a domain that is not the same as the `domain` configuration,
## like a .`onion` address, `.i2p` address, `.b32.i2p` address, etc.
##
## It will detect the alternative domain trough the `X-Forwarded-Host` header.
## https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-Host
##
## Accepted values: a list of fully qualified domain names (FQDN)
## Default: <none>
##
## Example:
## alternative_domains:
## - invidious.example.com
## - inv.example.com
## - videos.example.com
##
alternative_domains:
##
## Tell Invidious that it is behind a proxy that provides only
## HTTPS, so all links must use the https:// scheme. This