Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderniebuhr authored and astrobot-houston committed Nov 16, 2023
1 parent 5b62509 commit bbd30c0
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 40 deletions.
40 changes: 20 additions & 20 deletions packages/cloudflare/src/entrypoints/server.advanced.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,32 +40,32 @@ export function createExports(manifest: SSRManifest) {
}

let routeData = app.match(request);
Reflect.set(
request,
Symbol.for('astro.clientAddress'),
request.headers.get('cf-connecting-ip')
);
Reflect.set(
request,
Symbol.for('astro.clientAddress'),
request.headers.get('cf-connecting-ip')
);

const locals: AdvancedRuntime = {
runtime: {
waitUntil: (promise: Promise<any>) => {
context.waitUntil(promise);
},
env: env,
cf: request.cf,
caches: caches as unknown as CacheStorage,
const locals: AdvancedRuntime = {
runtime: {
waitUntil: (promise: Promise<any>) => {
context.waitUntil(promise);
},
};
env: env,
cf: request.cf,
caches: caches as unknown as CacheStorage,
},
};

let response = await app.render(request, routeData, locals);
let response = await app.render(request, routeData, locals);

if (app.setCookieHeaders) {
for (const setCookieHeader of app.setCookieHeaders(response)) {
response.headers.append('Set-Cookie', setCookieHeader);
}
if (app.setCookieHeaders) {
for (const setCookieHeader of app.setCookieHeaders(response)) {
response.headers.append('Set-Cookie', setCookieHeader);
}
}

return response;
return response;
};

return { default: { fetch } };
Expand Down
40 changes: 20 additions & 20 deletions packages/cloudflare/src/entrypoints/server.directory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,32 @@ export function createExports(manifest: SSRManifest) {
}

let routeData = app.match(request);
Reflect.set(
request,
Symbol.for('astro.clientAddress'),
request.headers.get('cf-connecting-ip')
);
Reflect.set(
request,
Symbol.for('astro.clientAddress'),
request.headers.get('cf-connecting-ip')
);

const locals: DirectoryRuntime = {
runtime: {
waitUntil: (promise: Promise<any>) => {
context.waitUntil(promise);
},
env: context.env,
cf: request.cf,
caches: caches as unknown as CacheStorage,
const locals: DirectoryRuntime = {
runtime: {
waitUntil: (promise: Promise<any>) => {
context.waitUntil(promise);
},
};
env: context.env,
cf: request.cf,
caches: caches as unknown as CacheStorage,
},
};

let response = await app.render(request, routeData, locals);
let response = await app.render(request, routeData, locals);

if (app.setCookieHeaders) {
for (const setCookieHeader of app.setCookieHeaders(response)) {
response.headers.append('Set-Cookie', setCookieHeader);
}
if (app.setCookieHeaders) {
for (const setCookieHeader of app.setCookieHeaders(response)) {
response.headers.append('Set-Cookie', setCookieHeader);
}
}

return response;
return response;
};

return { onRequest, manifest };
Expand Down

0 comments on commit bbd30c0

Please sign in to comment.