mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-30 09:45:15 +01:00
* fix: adds port and schema to connection again to fix clashes between same host. fixes #2279 * fixes tests
23 lines
446 B
TypeScript
23 lines
446 B
TypeScript
const text = document.querySelector("script#config__json")?.textContent || "{}";
|
|
|
|
interface Config {
|
|
version: string;
|
|
base: string;
|
|
authorizationNeeded: boolean;
|
|
secured: boolean;
|
|
maxLogs: number;
|
|
hostname: string;
|
|
hosts: { name: string; id: string }[];
|
|
}
|
|
|
|
const pageConfig = JSON.parse(text);
|
|
|
|
const config: Config = {
|
|
maxLogs: 600,
|
|
...pageConfig,
|
|
};
|
|
|
|
config.version = config.version.replace(/^v/, "");
|
|
|
|
export default config;
|