mirror of
https://github.com/TheBinaryNinja/tvapp2.git
synced 2026-06-04 03:35:42 -04:00
fix: add header-encoding env variable to fix gzip compression for jellyfin xml grab
If gzip compression is enabled for the tvapp2 webserver, this may cause Jellyfin to fail when fetching newest xml guide data. to correct this, we create an env variable which allows us to disable gzip compression for `Accept-Encoding`
This commit is contained in:
@@ -70,6 +70,7 @@ ENV DIR_RUN=/usr/bin/app
|
|||||||
ENV URL_REPO="https://git.binaryninja.net/binaryninja/"
|
ENV URL_REPO="https://git.binaryninja.net/binaryninja/"
|
||||||
ENV WEB_IP="0.0.0.0"
|
ENV WEB_IP="0.0.0.0"
|
||||||
ENV WEB_PORT=4124
|
ENV WEB_PORT=4124
|
||||||
|
ENV WEB_ENCODING="deflate, br"
|
||||||
ENV STREAM_QUALITY="hd"
|
ENV STREAM_QUALITY="hd"
|
||||||
ENV FILE_URL="urls.txt"
|
ENV FILE_URL="urls.txt"
|
||||||
ENV FILE_M3U="playlist.m3u8"
|
ENV FILE_M3U="playlist.m3u8"
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ const envFileURL = process.env.FILE_URL || 'urls.txt';
|
|||||||
const envFileM3U = process.env.FILE_M3U || 'playlist.m3u8';
|
const envFileM3U = process.env.FILE_M3U || 'playlist.m3u8';
|
||||||
const envFileXML = process.env.FILE_EPG || 'xmltv.xml';
|
const envFileXML = process.env.FILE_EPG || 'xmltv.xml';
|
||||||
const envFileTAR = process.env.FILE_TAR || 'xmltv.xml.gz';
|
const envFileTAR = process.env.FILE_TAR || 'xmltv.xml.gz';
|
||||||
|
const envWebEncoding = process.env.WEB_ENCODING || 'deflate, br';
|
||||||
const LOG_LEVEL = process.env.LOG_LEVEL || 10;
|
const LOG_LEVEL = process.env.LOG_LEVEL || 10;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -480,7 +481,7 @@ async function fetchRemote( url )
|
|||||||
mod
|
mod
|
||||||
.get( url, {
|
.get( url, {
|
||||||
headers: {
|
headers: {
|
||||||
'Accept-Encoding': 'gzip, deflate, br'
|
'Accept-Encoding': envWebEncoding
|
||||||
}
|
}
|
||||||
}, ( resp ) =>
|
}, ( resp ) =>
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user