Frontend uudelleenrakennettu: Astro-komponentit, Wasm pääsäikeessä, ei Workeria
Vanha frontend siirretty temp/. Uusi rakenne: - StatusBar.astro, Terminal.astro, Editor.astro, Guide.astro - global.css erillinen - Wasm pääsäikeessä (ei Worker — yksinkertainen, debugattava) - Tab-completion, dropdown, projektikortti, Monaco, GUIDE.md - Ei tokenisointia eikä koodilaboratoriota Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
23
network-poc/frontend/node_modules/@astrojs/internal-helpers/dist/request.js
generated
vendored
Normal file
23
network-poc/frontend/node_modules/@astrojs/internal-helpers/dist/request.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
function getFirstForwardedValue(multiValueHeader) {
|
||||
return multiValueHeader?.toString()?.split(",").map((e) => e.trim())?.[0];
|
||||
}
|
||||
const IP_RE = /^[0-9a-fA-F.:]{1,45}$/;
|
||||
function isValidIpAddress(value) {
|
||||
return IP_RE.test(value);
|
||||
}
|
||||
function getValidatedIpFromHeader(headerValue) {
|
||||
const raw = getFirstForwardedValue(headerValue);
|
||||
if (raw && isValidIpAddress(raw)) {
|
||||
return raw;
|
||||
}
|
||||
return void 0;
|
||||
}
|
||||
function getClientIpAddress(request) {
|
||||
return getValidatedIpFromHeader(request.headers.get("x-forwarded-for"));
|
||||
}
|
||||
export {
|
||||
getClientIpAddress,
|
||||
getFirstForwardedValue,
|
||||
getValidatedIpFromHeader,
|
||||
isValidIpAddress
|
||||
};
|
||||
Reference in New Issue
Block a user