mirror of
https://github.com/LittleChest/Dohna-NS.git
synced 2026-09-21 00:36:51 +08:00
Revert "common: Block requests with unusual Host header"
This reverts commit 1a10e16745.
This commit is contained in:
@@ -45,13 +45,6 @@ export default async function handler(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const { method, headers, url } = request;
|
const { method, headers, url } = request;
|
||||||
|
|
||||||
const host = headers.get("Host");
|
|
||||||
|
|
||||||
if (host && (host.endsWith(":443") || host.endsWith(":80"))) {
|
|
||||||
return new Response(null, { status: 403 });
|
|
||||||
}
|
|
||||||
|
|
||||||
const { search, searchParams, pathname } = new URL(url);
|
const { search, searchParams, pathname } = new URL(url);
|
||||||
|
|
||||||
const ip =
|
const ip =
|
||||||
|
|||||||
Reference in New Issue
Block a user