aboutsummaryrefslogtreecommitdiff
path: root/src/server/server_Initialization.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/server_Initialization.ts')
-rw-r--r--src/server/server_Initialization.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/server/server_Initialization.ts b/src/server/server_Initialization.ts
index 9183688c6..2190e27c7 100644
--- a/src/server/server_Initialization.ts
+++ b/src/server/server_Initialization.ts
@@ -29,7 +29,6 @@ import { WebSocket } from './websocket';
export type RouteSetter = (server: RouteManager) => void;
// export let disconnect: Function;
-// eslint-disable-next-line import/no-mutable-exports
export let resolvedServerUrl: string;
const week = 7 * 24 * 60 * 60 * 1000;
@@ -115,12 +114,12 @@ function registerEmbeddedBrowseRelativePathHandler(server: express.Express) {
}
function proxyServe(req: any, requrl: string, response: any) {
- // eslint-disable-next-line global-require
+ // eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
const htmlBodyMemoryStream = new (require('memorystream'))();
let wasinBrFormat = false;
const sendModifiedBody = () => {
const header = response.headers['content-encoding'];
- const refToCors = (match: any, tag: string, sym: string, href: string) => `${tag}=${sym + resolvedServerUrl}/corsProxy/${href + sym}`;
+ const refToCors = (match: string, tag: string, sym: string, href: string) => `${tag}=${sym + resolvedServerUrl}/corsProxy/${href + sym}`;
// const relpathToCors = (match: any, href: string, offset: any, string: any) => `="${resolvedServerUrl + '/corsProxy/' + decodeURIComponent(req.originalUrl.split('/corsProxy/')[1].match(/https?:\/\/[^\/]*/)?.[0] ?? '') + '/' + href}"`;
if (header) {
try {
@@ -238,7 +237,7 @@ function registerAuthenticationRoutes(server: express.Express) {
export default async function InitializeServer(routeSetter: RouteSetter) {
const isRelease = determineEnvironment();
const app = buildWithMiddleware(express());
- const compiler = webpack(config as any);
+ const compiler = webpack(config as webpack.Configuration);
// route table managed by express. routes are tested sequentially against each of these map rules. when a match is found, the handler is called to process the request
app.use(wdm(compiler, { publicPath: config.output.publicPath }));