Update path to frontend static files

Signed-off-by: Joe Ma <rikkaneko23@gmail.com>
This commit is contained in:
Joe Ma 2023-11-19 02:50:56 +08:00
parent 3de4fa14ed
commit 2e9a56376d
No known key found for this signature in database
GPG key ID: 7A0ECF5F5EDC587F
7 changed files with 8 additions and 187 deletions

View file

@ -56,7 +56,7 @@ router.get('/favicon.ico', () => {
});
// Web script and style file
router.get('/(css|js)/*', (request) => {
router.get('/static/*', (request) => {
const { url } = request;
const { pathname } = new URL(url);
const path = pathname.replace(/\/+$/, '') || '/';