Files
agentic-studio/network-poc/frontend/node_modules/@astrojs/internal-helpers/dist/request.d.ts
Jaakko Vanhala a8c4af0975 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>
2026-04-09 20:17:39 +03:00

28 lines
1.2 KiB
TypeScript

/**
* Utilities for extracting information from `Request`
*/
export declare function getFirstForwardedValue(multiValueHeader?: string | string[] | null): string | undefined;
/**
* Checks whether a string looks like an IP address (contains only characters
* that can appear in IPv4/IPv6 addresses and is within a reasonable length).
*
* This is a permissive allowlist — it won't catch every malformed IP, but it
* reliably rejects injection payloads. Does NOT use Node.js APIs so it works
* in all runtimes (Workers, Deno, etc.).
*/
export declare function isValidIpAddress(value: string): boolean;
/**
* Extracts the first value from a potentially multi-value header and validates
* that it is a syntactically valid IP address.
*
* Useful for adapters that read client IP from a platform-specific header
*/
export declare function getValidatedIpFromHeader(headerValue: string | string[] | null | undefined): string | undefined;
/**
* Returns the first value associated to the `x-forwarded-for` header,
* but only if it is a valid IP address. Returns `undefined` otherwise.
*
* @param {Request} request
*/
export declare function getClientIpAddress(request: Request): string | undefined;