patch index.html

master
宇天 2022-04-26 01:46:30 +08:00
parent b91986c3ed
commit e2db34a6b2
2 changed files with 5 additions and 1 deletions

View File

@ -74,6 +74,10 @@ function createServer() {
pathname = decode(pathname) || 'index.html' pathname = decode(pathname) || 'index.html'
if (pathname.endsWith('/')) {
pathname += 'index.html'
}
let file = join(root, pathname) let file = join(root, pathname)
let stat = fs.stat(file) let stat = fs.stat(file)
let ext = pathname.split('.').pop() let ext = pathname.split('.').pop()

View File

@ -2,7 +2,7 @@
"name": "simple-http", "name": "simple-http",
"displayName": "simple http", "displayName": "simple http",
"description": "🔥 简单的http服务器, 方便临时调试html", "description": "🔥 简单的http服务器, 方便临时调试html",
"version": "1.2.1", "version": "1.2.2",
"publisher": "yutent", "publisher": "yutent",
"author": "Yutent [@yutent]", "author": "Yutent [@yutent]",
"icon": "logo.png", "icon": "logo.png",