context-path 대응 추가 수정
This commit is contained in:
@@ -8,13 +8,16 @@
|
||||
|
||||
class APIClient {
|
||||
|
||||
CLIENT_URL = 'mgmt/api/test.do';
|
||||
CLIENT_URL = '/mgmt/api/test.do';
|
||||
|
||||
constructor(contextPath) {
|
||||
window.globals = {};
|
||||
this.variables = {};
|
||||
this.abortController = null;
|
||||
this.contextPath = contextPath || '/';
|
||||
this.contextPath = document.querySelector('meta[name="context-path"]').getAttribute('content');
|
||||
if (!this.contextPath) {
|
||||
this.contextPath = '/';
|
||||
}
|
||||
}
|
||||
|
||||
getClientUrl() {
|
||||
|
||||
@@ -3,17 +3,22 @@ import APIScenario from "./APIScenario";
|
||||
|
||||
window.MonacoEnvironment = {
|
||||
getWorkerUrl: function (moduleId, label) {
|
||||
let contextPath = document.querySelector('meta[name="context-path"]').getAttribute('content');
|
||||
if (!contextPath) {
|
||||
contextPath = '/';
|
||||
}
|
||||
|
||||
if (label === 'json') {
|
||||
return '/plugins/apitestmanager/json.worker.bundle.js';
|
||||
return contextPath + '/plugins/apitestmanager/json.worker.bundle.js';
|
||||
}
|
||||
if (label === 'css' || label === 'scss' || label === 'less') {
|
||||
return '/plugins/apitestmanager/css.worker.bundle.js';
|
||||
return contextPath + '/plugins/apitestmanager/css.worker.bundle.js';
|
||||
}
|
||||
if (label === 'html' || label === 'handlebars' || label === 'razor') {
|
||||
return '/plugins/apitestmanager/html.worker.bundle.js';
|
||||
return contextPath + '/plugins/apitestmanager/html.worker.bundle.js';
|
||||
}
|
||||
if (label === 'typescript' || label === 'javascript') {
|
||||
return '/plugins/apitestmanager/ts.worker.bundle.js';
|
||||
return contextPath + '/plugins/apitestmanager/ts.worker.bundle.js';
|
||||
}
|
||||
return '/plugins/apitestmanager/editor.worker.bundle.js';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user