Remove url server config option

This commit is contained in:
James Lyne 2021-05-18 20:16:44 +01:00
parent 8165dc1255
commit 39d4dcba46
4 changed files with 1 additions and 18 deletions

View File

@ -31,7 +31,6 @@
servers: {
creative: {
label: 'Creative',
url: '/map/creative',
dynmap: {
configuration: 'http://dynmap.local/standalone/creative/MySQL_configuration.php',
update: 'http://dynmap.local/standalone/creative/MySQL_update.php?world={world}&ts={timestamp}',
@ -44,7 +43,6 @@
},
survival: {
label: 'Survival',
url: '/map/survival',
dynmap: {
configuration: 'http://dynmap.local/standalone/survival/MySQL_configuration.php',
update: 'http://dynmap.local/standalone/survival/MySQL_update.php?world={world}&ts={timestamp}',
@ -57,7 +55,6 @@
},
build: {
label: 'Build',
url: '/map/build',
dynmap: {
configuration: 'http://dynmap.local/standalone/build/MySQL_configuration.php',
update: 'http://dynmap.local/standalone/build/MySQL_update.php?world={world}&ts={timestamp}',

View File

@ -602,19 +602,6 @@ const validateLiveAtlasConfiguration = (config: any): Map<string, LiveAtlasServe
throw new ConfigurationError(`Server '${server}': Dynmap sendmessage URL missing. ${check}`);
}
if(serverConfig.url) {
const a = document.createElement('a');
a.href = serverConfig.url;
if(a.origin !== window.location.origin) {
throw new ConfigurationError(`Server '${server}': URL doesn't match LiveAtlas origin. ${check}`);
}
serverConfig.url = a.pathname;
} else {
serverConfig.url = serverConfig.id;
}
result.set(server, serverConfig);
}

1
src/index.d.ts vendored
View File

@ -22,7 +22,6 @@ declare module '@vue/runtime-core' {
interface LiveAtlasServerDefinition {
id: string
label?: string
url?: string
}
interface LiveAtlasDynmapServerDefinition extends LiveAtlasServerDefinition {

View File

@ -96,7 +96,7 @@ try {
//Update url if server doesn't exist
if(serverName !== lastSegment) {
window.history.replaceState({}, '', store.state.servers.get(serverName)!.url + window.location.hash);
window.history.replaceState({}, '', serverName + window.location.hash);
}
store.commit(MutationTypes.SET_CURRENT_SERVER, serverName);