Skip to content

Commit

Permalink
fix, hopefully
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Jan 18, 2023
1 parent a618303 commit f17a42d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/adapter-cloudflare-workers/ambient.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Cache, CacheStorage } from '@cloudflare/workers-types';
import { CacheStorage } from '@cloudflare/workers-types';

declare global {
namespace App {
Expand Down
7 changes: 6 additions & 1 deletion packages/adapter-cloudflare-workers/files/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ export default {

// dynamically-generated pages
return await server.respond(req, {
platform: { env, context, caches },
platform: {
env,
context,
// @ts-expect-error lib.dom is interfering with workers-types
caches
},
getClientAddress() {
return req.headers.get('cf-connecting-ip');
}
Expand Down

0 comments on commit f17a42d

Please sign in to comment.