mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-11-11 05:10:51 +03:00
revert consolePath change for console (#1226)
This commit is contained in:
parent
87edce1b12
commit
4940492266
@ -32,7 +32,6 @@ const globals = {
|
||||
? 'server'
|
||||
: window.__env.consoleMode,
|
||||
urlPrefix: checkExtraSlashes(window.__env.urlPrefix),
|
||||
consolePath: window.__env.consolePath,
|
||||
};
|
||||
|
||||
// set defaults
|
||||
@ -64,15 +63,8 @@ if (
|
||||
|
||||
if (globals.consoleMode === SERVER_CONSOLE_MODE) {
|
||||
if (globals.nodeEnv !== 'development') {
|
||||
const safeCurrentUrl = checkExtraSlashes(window.location.href);
|
||||
globals.dataApiUrl = safeCurrentUrl.slice(
|
||||
0,
|
||||
safeCurrentUrl.lastIndexOf(window.__env.consolePath)
|
||||
);
|
||||
const currentPath = checkExtraSlashes(window.location.pathname);
|
||||
globals.urlPrefix =
|
||||
currentPath.slice(0, currentPath.lastIndexOf(window.__env.consolePath)) +
|
||||
'/console';
|
||||
const windowUrl = window.location.protocol + '//' + window.location.host;
|
||||
globals.dataApiUrl = windowUrl;
|
||||
}
|
||||
/*
|
||||
* Require the exact usecase
|
||||
|
Loading…
Reference in New Issue
Block a user