diff --git a/striker-ui-api/src/routes/static.ts b/striker-ui-api/src/routes/static.ts index 12585606..414f8195 100644 --- a/striker-ui-api/src/routes/static.ts +++ b/striker-ui-api/src/routes/static.ts @@ -26,8 +26,9 @@ router.use( const parts = originalUrl.replace(/[/]$/, '').split('/'); const tail = parts.pop() || 'index'; + const extended = /[.]html$/.test(tail) ? tail : `${tail}.html`; - parts.push(`${tail}.html`); + parts.push(extended); const htmlPath = path.posix.join(htmlDir, ...parts); const isHtmlExists = existsSync(htmlPath);