@astrojs/node
Advanced tools
Comparing version 5.1.4 to 5.2.0
@@ -41,3 +41,9 @@ import fs from "fs"; | ||
stream.on("directory", () => { | ||
const location = req.url + "/"; | ||
let location; | ||
if (req.url.includes("?")) { | ||
const [url = "", search] = req.url.split("?"); | ||
location = `${url}/?${search}`; | ||
} else { | ||
location = req.url + "/"; | ||
} | ||
res.statusCode = 301; | ||
@@ -44,0 +50,0 @@ res.setHeader("Location", location); |
@@ -0,1 +1,2 @@ | ||
import { createOutgoingHttpHeaders } from "./createOutgoingHttpHeaders"; | ||
import { responseIterator } from "./response-iterator"; | ||
@@ -36,6 +37,9 @@ function nodeMiddleware_default(app, mode) { | ||
if (setCookieHeaders.length) { | ||
res.setHeader("Set-Cookie", setCookieHeaders); | ||
for (const setCookieHeader of setCookieHeaders) { | ||
webResponse.headers.append("set-cookie", setCookieHeader); | ||
} | ||
} | ||
} | ||
res.writeHead(status, Object.fromEntries(headers.entries())); | ||
const nodeHeaders = createOutgoingHttpHeaders(headers); | ||
res.writeHead(status, nodeHeaders); | ||
if (webResponse.body) { | ||
@@ -42,0 +46,0 @@ try { |
{ | ||
"name": "@astrojs/node", | ||
"description": "Deploy your site to a Node.js server", | ||
"version": "5.1.4", | ||
"version": "5.2.0", | ||
"type": "module", | ||
@@ -30,3 +30,3 @@ "types": "./dist/index.d.ts", | ||
"dependencies": { | ||
"@astrojs/webapi": "^2.1.1", | ||
"@astrojs/webapi": "^2.2.0", | ||
"send": "^0.18.0", | ||
@@ -36,5 +36,6 @@ "server-destroy": "^1.0.1" | ||
"peerDependencies": { | ||
"astro": "^2.5.0" | ||
"astro": "^2.6.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^18.7.21", | ||
"@types/send": "^0.17.1", | ||
@@ -47,3 +48,3 @@ "@types/server-destroy": "^1.0.1", | ||
"undici": "^5.22.0", | ||
"astro": "2.5.0", | ||
"astro": "2.6.0", | ||
"astro-scripts": "0.0.14" | ||
@@ -50,0 +51,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29950
21
623
10
Updated@astrojs/webapi@^2.2.0