Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this._app.use((req, res, next) => {
const {pathname} = new URL(req.url, 'request-target://');
switch (pathname) {
case '/':
case '/index.html':
const remoteAddress = morgan['remote-addr'](req);
const userAgent = morgan['user-agent'](req);
console.log(
chalk.cyan((new Date()).toLocaleTimeString()),
`${remoteAddress} GET ${pathname} "${userAgent}"`
);
let styles = [];
if (config.postcss.importEntryPoints) {
styles = config.postcss.importEntryPoints;
} else {
styles = this._application.getSortedStyles();
}
styles = styles.map((fsPath) => this.getStyleWebPath(fsPath));
this._respondIndexHTMLPage(res, {