Skip to content

Commit

Permalink
esm-worker: remove "invalid hostname" error
Browse files Browse the repository at this point in the history
  • Loading branch information
ije committed Jul 28, 2023
1 parent 59bab0c commit eef7554
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/esm-worker/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class ESMWorker {
waitUntil: (p: Promise<any>) => context.waitUntil(p),
withCache,
};

// for deno runtime
if (Reflect.has(context, "connInfo")) {
Object.assign(ctx, Reflect.get(context, "connInfo"));
Expand All @@ -122,8 +123,6 @@ class ESMWorker {
const subdomain = url.hostname.slice(0, -7);
if (subdomain.startsWith("v") && /^\d+$/.test(subdomain.slice(1))) {
buildVersion = subdomain;
} else {
return err("Invalid hostname", 400);
}
}

Expand Down

0 comments on commit eef7554

Please sign in to comment.