mirror of
https://github.com/LittleChest/Dohna-NS.git
synced 2026-05-06 22:44:50 +08:00
Revert "common: Block requests with unusual Host header"
This reverts commit 1a10e1674511ba1433e2f3ab96a99973757353bb.
This commit is contained in:
parent
66f9b52254
commit
6449b08064
@ -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 =
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user