From eabe517b89e44412ce16baf09b8df25761594de7 Mon Sep 17 00:00:00 2001 From: Roland Date: Fri, 20 Dec 2024 11:14:01 -0700 Subject: [PATCH] Fixing Files link to nginx media file browser. --- app/src/components/Vars.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/components/Vars.js b/app/src/components/Vars.js index 49162e7d..414413ca 100644 --- a/app/src/components/Vars.js +++ b/app/src/components/Vars.js @@ -7,8 +7,8 @@ export const DEFAULT_LIMIT = 20; export const NAME = process.env && process.env.REACT_APP_NAME ? process.env.REACT_APP_NAME : null; // Other services on a WROLPi. -const port = window.location.port ? `${window.location.port}` : ''; -export const FILES_MEDIA_URI = `https://${window.location.hostname}${port}/media/`; +const port = window.location.port ? `${window.location.port.replace(/^/, '')}` : ''; +export const FILES_MEDIA_URI = `https://${window.location.hostname}:${port}/media/`; export const MAP_VIEWER_URI = `https://${window.location.hostname}:8084`; export const ZIM_VIEWER_URI = `https://${window.location.hostname}:8085`; export const HELP_VIEWER_URI = `https://${window.location.hostname}:8086`;