You are using localhost or 0.0.0.0 as a hostname in the configuration. It is recommended that you use a domain name instead.
diff --git a/client/src/pages/servapps/servapps.jsx b/client/src/pages/servapps/servapps.jsx
index 3946dc2..d4e9fd3 100644
--- a/client/src/pages/servapps/servapps.jsx
+++ b/client/src/pages/servapps/servapps.jsx
@@ -8,9 +8,11 @@ import Paper from '@mui/material/Paper';
import { styled } from '@mui/material/styles';
import * as API from '../../api';
-import isLoggedIn from '../../isLoggedIn';
+import IsLoggedIn from '../../IsLoggedIn';
import RestartModal from '../config/users/restart';
import RouteManagement, { ValidateRoute } from '../config/users/routeman';
+import { sanitizeRoute } from '../../utils/routes';
+import HostChip from '../../components/hostChip';
const Item = styled(Paper)(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff',
@@ -20,11 +22,14 @@ const Item = styled(Paper)(({ theme }) => ({
color: theme.palette.text.secondary,
}));
-const noOver = {overflowX: 'auto', width: "100%"}
+const noOver = {
+ overflowX: 'auto',
+ width: "100%",
+ maxWidth: "800px",
+ height: "50px"
+}
const ServeApps = () => {
- isLoggedIn();
-
const [serveApps, setServeApps] = useState([]);
const [isUpdating, setIsUpdating] = useState({});
const [search, setSearch] = useState("");
@@ -71,10 +76,12 @@ const ServeApps = () => {
const getContainersRoutes = (containerName) => {
return (config && config.HTTPConfig && config.HTTPConfig.ProxyConfig.Routes.filter((route) => {
- return route.Mode == "SERVAPP" && (
- route.Target.startsWith(containerName) ||
- route.Target.split('://')[1].startsWith(containerName)
- )
+ let reg = new RegExp(`^(([a-z]+):\/\/)?${containerName}(:?[0-9]+)?$`, 'i');
+ return route.Mode == "SERVAPP" && reg.test(route.Target)
+ // (
+ // route.Target.startsWith(containerName) ||
+ // route.Target.split('://')[1].startsWith(containerName)
+ // )
})) || [];
}
@@ -112,7 +119,12 @@ const ServeApps = () => {
},
};
+ const getHostnameFromName = (name) => {
+ return name.replace('/', '').replace(/_/g, '-').replace(/[^a-zA-Z0-9-]/g, '').toLowerCase().replace(/\s/g, '-') + '.' + window.location.origin.split('://')[1]
+ }
+
return
+