Fix node standalone for windows system (#5207)
This commit is contained in:
parent
6e417a9636
commit
c203a5cc2f
2 changed files with 8 additions and 4 deletions
5
.changeset/metal-boxes-compare.md
Normal file
5
.changeset/metal-boxes-compare.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@astrojs/node': patch
|
||||
---
|
||||
|
||||
fix static server path for windows system
|
|
@ -16,10 +16,9 @@ export function createServer(
|
|||
) {
|
||||
const listener: http.RequestListener = (req, res) => {
|
||||
if (req.url) {
|
||||
const fileURL = new URL('.' + req.url, client);
|
||||
|
||||
const stream = send(req, fileURLToPath(fileURL), {
|
||||
dotfiles: 'deny',
|
||||
const stream = send(req, encodeURI(req.url), {
|
||||
root: fileURLToPath(client),
|
||||
dotfiles: "deny"
|
||||
});
|
||||
|
||||
let forwardError = false;
|
||||
|
|
Loading…
Reference in a new issue