Skip to content

Commit

Permalink
Fix pathname
Browse files Browse the repository at this point in the history
  • Loading branch information
alallier committed Aug 14, 2024
1 parent 5012c21 commit 2ce2f51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/reload-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const tryFiles = (...files) => {
const serve = serveStatic(dir, { index: ['index.html', 'index.htm'] })

const server = http.createServer(function (req, res) {
const pathname = new URL(req.url).pathname
const pathname = new URL(req.url, `http://${hostname}`).pathname

const ext = path.extname(pathname)
const file = path.join(dir, pathname)
Expand Down

0 comments on commit 2ce2f51

Please sign in to comment.