would a rewrite middleware that only keeps certain params be enough then?
would a rewrite middleware that only keeps certain params be enough then?

url field of the draw object need to be a URL, or can it be an image object/blob? I have a second Worker that generates images, to be used as layers in an overlay, but I need to fetch the images to get dimensions before they're drawn as the overlay
postgres package:
pg actually is supported though.
encodeBody: 'manual' or another technique can be used to turn off the automatic decompression of the result of a fetch request, as a corollary to the way one can turn off automatic compression of the response a worker returns? (So that one could, say, have a worker fetch from a server, store the compressed response in KV, and at some later point respond to a request with the compressed response with encodeBody: 'manual'). I know you can passthrough an unmodified compressed response, but my understanding is that you can't access them directly to store them.TransformStream() the right way to measure bandwidth? Thanks in advance.
.dev.vars file?wrangler deletefunctionality seems a bit dangerous.. it would be nice if I could somehow restrict an API key to only be able to delete workers that were created by that same key... otherwise it could theoretically snipe anything elseclass Foo extends RpcTarget {
async fetch(request: Request): Promise<Response> {
return new Response('Hello!');
}
}Type '{ clone: Stub<() => Response>; status: number; statusText: string; headers: { get: Stub<(name: string) => string | null>; getAll: Stub<(name: string) => string[]>; ... 9 more ...; [Symbol.iterator]: Stub<...>; }; ... 12 more ...; blob: Stub<...>; } & Disposable' is not assignable to type 'Response'.
The types of 'clone(...).status' are incompatible between these types.
Type 'Promise<number>' is not assignable to type 'number'.ts(2322)postgrespgencodeBody: 'manual'encodeBody: 'manual'TransformStream().dev.varswrangler deleteexport const stripUnusedSearchParams = createMiddleware<{ Bindings: CloudflareBindings }>(async (c, next) => {
const url = new URL(c.req.url);
let foundInvalidSearchParams = false;
for (const key of url.searchParams.keys()) {
if (!validSearchParams.includes(key)) {
url.searchParams.delete(key);
foundInvalidSearchParams = true;
}
}
if (foundInvalidSearchParams) {
return c.redirect(url.searchParams.size ? `${url.pathname}?${url.searchParams}` : url.pathname, 302);
}
await next();
});