@promptbook/remote-server
Version:
Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action
23 lines (22 loc) • 714 B
TypeScript
import type { string_hostname } from '../../../types/string_host';
/**
* Options for `isHostnameOnPrivateNetwork`
*/
export type IsHostnameOnPrivateNetworkOptions = {
/**
* Whether to allow localhost
*
* @default false
*/
readonly allowLocalhost?: boolean;
};
/**
* Checks if an URL is reserved for private networks or localhost.
*
* Note: There are two similar functions:
* - `isUrlOnPrivateNetwork` which tests full URL
* - `isHostnameOnPrivateNetwork` *(this one)* which tests just hostname
*
* @public exported from `@promptbook/utils`
*/
export declare function isHostnameOnPrivateNetwork(hostname: string_hostname, options?: IsHostnameOnPrivateNetworkOptions): boolean;