UNPKG

@w0s/report-same-referrer

Version:
30 lines 780 B
interface FetchParam { documentURL: string; referrer: string; } export interface Option { fetchParam: FetchParam; fetchContentType?: 'application/x-www-form-urlencoded' | 'application/json'; fetchHeaders?: HeadersInit; condition?: 'origin' | 'host' | 'hostname'; same?: string[]; denyUAs?: RegExp[]; allowUAs?: RegExp[]; } /** * Send referrer error information to endpoints */ export default class { #private; /** * @param endpoint - URL of the endpoint * @param options - Information such as transmission conditions */ constructor(endpoint: string, options: Readonly<Option>); /** * Referrer check & report */ report(): Promise<void>; } export {}; //# sourceMappingURL=ReportSameReferrer.d.ts.map