Since the default CheckRedirect has been replaced with ours, we won't get the default protection of erroring after 10 redirects, so i've copied that back in from the std implementation
The Plex integration used bare http.Client values with no CheckRedirect
policy, so they followed redirects automatically. net/http strips the
standard sensitive headers on a cross-host redirect but not custom-named
headers, so the Plex token carried in X-Plex-Token was forwarded verbatim
to any host the configured PLEX_HOST redirected to, disclosing the
credential.
Route all Plex outbound calls through a shared client whose CheckRedirect
policy deletes X-Plex-Token when the redirect target host differs from the
original request host. Includes a regression test.
Signed-off-by: tonghuaroot <tonghuaroot@gmail.com>
use media in content pages, remove canvas from dom after img loaded in poster, fix filter menu buttons active style, view trailer btn is a component now, show justwatch attribution (didnt realise we had to until i saw the api docs to check providers data), no longer need to use copier for detail responses, move and make tranformproviders more resilient
Now that we have everything encapsulated in Services, we can move the db parameters of each function into the service struct itself which:
1. Simplified calling and reduces us passing around the db in random funcs that just pass it to a service func
2. probably other stuff
3. looks nicer now