Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp authored and actions-user committed Apr 7, 2022
1 parent 4b0f27d commit 7ada628
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/astro/src/vite-plugin-astro-server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ async function writeWebResponse(res: http.ServerResponse, webResponse: Response)
const { status, headers, body } = webResponse;

let _headers = {};
if('raw' in headers) {
if ('raw' in headers) {
// Node fetch allows you to get the raw headers, which includes multiples of the same type.
// This is needed because Set-Cookie *must* be called for each cookie, and can't be
// concatenated together.
type HeadersWithRaw = Headers & {
raw: () => Record<string, string[]>
raw: () => Record<string, string[]>;
};

for(const [key, value] of Object.entries((headers as HeadersWithRaw).raw())) {
for (const [key, value] of Object.entries((headers as HeadersWithRaw).raw())) {
res.setHeader(key, value);
}
} else {
Expand Down

0 comments on commit 7ada628

Please sign in to comment.