二级代理路径问题

This commit is contained in:
bwcx_jzy 2021-09-15 18:55:33 +08:00
parent 1b9caa00b1
commit 850b00f46f
2 changed files with 4 additions and 1 deletions

View File

@ -69,6 +69,9 @@ public class IndexControl extends BaseServerController {
jsCommonContext = FileUtil.readString(file, CharsetUtil.CHARSET_UTF_8);
}
html = StrUtil.replace(html, "<div id=\"jpomCommonJs\"></div>", jsCommonContext);
// <routerBase>
String proxyPath = UrlRedirectUtil.getHeaderProxyPath(getRequest(), BaseJpomInterceptor.PROXY_PATH);
html = StrUtil.replace(html, "<routerBase>", proxyPath);
ServletUtil.write(response, html, ContentType.TEXT_HTML.getValue());
}

View File

@ -17,7 +17,7 @@
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<script>
window.routerBase = "/";
window.routerBase = "<routerBase>";
</script>
<div id="app"></div>
<!-- built files will be auto injected -->