feat(ui): Move PROXY setting to UI (#782)

Users who have set PROXY=yes in their Docker containers will need to configure this setting in the UI and restart the container.
This commit is contained in:
TheCatLady
2021-01-29 20:46:51 -05:00
committed by GitHub
parent 67f8aef00d
commit f1dd5e7e12
7 changed files with 41 additions and 5 deletions

View File

@@ -61,7 +61,7 @@ app
startJobs();
const server = express();
if (process.env.PROXY === 'yes') {
if (settings.main.trustProxy) {
server.enable('trust proxy');
}
server.use(cookieParser());

View File

@@ -54,6 +54,7 @@ export interface MainSettings {
csrfProtection: boolean;
defaultPermissions: number;
hideAvailable: boolean;
trustProxy: boolean;
}
interface PublicSettings {
@@ -158,9 +159,10 @@ class Settings {
main: {
apiKey: '',
applicationUrl: '',
hideAvailable: false,
csrfProtection: false,
defaultPermissions: Permission.REQUEST,
hideAvailable: false,
trustProxy: false,
},
plex: {
name: '',