Skip to content

Commit

Permalink
Fix node standalone for windows system (#5207)
Browse files Browse the repository at this point in the history
  • Loading branch information
BeanWei committed Oct 27, 2022
1 parent 6e417a9 commit c203a5c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/metal-boxes-compare.md
@@ -0,0 +1,5 @@
---
'@astrojs/node': patch
---

fix static server path for windows system
7 changes: 3 additions & 4 deletions packages/integrations/node/src/http-server.ts
Expand Up @@ -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;
Expand Down

0 comments on commit c203a5c

Please sign in to comment.