You can have Wildcard Worker Routes, but not wildcard Worker Custom Domains, is what that was about
You can have Wildcard Worker Routes, but not wildcard Worker Custom Domains, is what that was about


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
class 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)export const cache = (name: string, minutes: number) =>
honoCache({
cacheName: name,
cacheControl: `public, max-age=${minutes * 60}`,
});export 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();
});