perimeterx-js-core 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/config/ConfigurationBase.js +7 -0
- package/lib/cjs/config/defaults/DefaultCommonConfigurationParams.js +1 -5
- package/lib/cjs/impl/url/UrlImpl.js +27 -7
- package/lib/cjs/logger/LoggerBase.js +3 -0
- package/lib/cjs/phase/flow/PostEnforceFlow.js +1 -1
- package/lib/cjs/phase/impl/CreateBlockResponsePhase.js +1 -1
- package/lib/cjs/phase/impl/ModifyOutgoingResponsePhase.js +3 -2
- package/lib/cjs/phase/impl/SendLogsPhase.js +3 -1
- package/lib/cjs/products/bot_defender/first_party/DefaultBotDefenderFirstParty.js +45 -10
- package/lib/cjs/pxhd/PXHDUtils.js +7 -6
- package/lib/cjs/utils/constants.js +2 -2
- package/lib/esm/config/ConfigurationBase.js +3 -0
- package/lib/esm/config/defaults/DefaultCommonConfigurationParams.js +1 -5
- package/lib/esm/impl/url/UrlImpl.js +26 -7
- package/lib/esm/logger/LoggerBase.js +3 -0
- package/lib/esm/phase/flow/PostEnforceFlow.js +1 -1
- package/lib/esm/phase/impl/CreateBlockResponsePhase.js +1 -1
- package/lib/esm/phase/impl/ModifyOutgoingResponsePhase.js +4 -2
- package/lib/esm/phase/impl/SendLogsPhase.js +1 -0
- package/lib/esm/products/bot_defender/first_party/DefaultBotDefenderFirstParty.js +45 -10
- package/lib/esm/pxhd/PXHDUtils.js +7 -6
- package/lib/esm/utils/constants.js +2 -2
- package/lib/types/config/ConfigurationBase.d.ts +1 -0
- package/lib/types/config/IConfiguration.d.ts +4 -0
- package/lib/types/config/params/CommonConfigurationParams.d.ts +1 -5
- package/lib/types/impl/url/UrlImpl.d.ts +5 -1
- package/lib/types/logger/ILogger.d.ts +4 -0
- package/lib/types/logger/LoggerBase.d.ts +1 -0
- package/lib/types/phase/impl/ModifyOutgoingResponsePhase.d.ts +3 -1
- package/lib/types/products/bot_defender/first_party/DefaultBotDefenderFirstParty.d.ts +1 -0
- package/lib/types/pxhd/PXHDUtils.d.ts +1274 -3
- package/lib/types/utils/constants.d.ts +1 -1
- package/package.json +1 -1
|
@@ -21,9 +21,6 @@ export type CommonConfigurationParams<Req, Res> = {
|
|
|
21
21
|
px_max_activity_batch_size?: number;
|
|
22
22
|
px_batch_activities_timeout_ms?: number;
|
|
23
23
|
px_bypass_monitor_header?: string;
|
|
24
|
-
px_csp_enabled?: boolean;
|
|
25
|
-
px_csp_no_updates_max_interval_minutes?: number;
|
|
26
|
-
px_csp_policy_refresh_interval_minutes?: number;
|
|
27
24
|
px_enforced_routes?: Array<string | RegExp>;
|
|
28
25
|
px_first_party_enabled?: boolean;
|
|
29
26
|
px_custom_first_party_prefix?: string;
|
|
@@ -58,7 +55,6 @@ export type CommonConfigurationParams<Req, Res> = {
|
|
|
58
55
|
px_js_ref?: string;
|
|
59
56
|
px_custom_cookie_header?: string;
|
|
60
57
|
px_custom_logo?: string;
|
|
61
|
-
px_proxy_url?: string;
|
|
62
58
|
px_jwt_cookie_name?: string;
|
|
63
59
|
px_jwt_cookie_user_id_field_name?: string;
|
|
64
60
|
px_jwt_cookie_additional_field_names?: string[];
|
|
@@ -74,7 +70,7 @@ export type CommonConfigurationParams<Req, Res> = {
|
|
|
74
70
|
px_remote_config_max_fetch_attempts?: number;
|
|
75
71
|
px_remote_config_retry_interval_ms?: number;
|
|
76
72
|
px_url_decode_reserved_characters?: boolean;
|
|
77
|
-
|
|
73
|
+
px_secured_pxhd_enabled?: boolean;
|
|
78
74
|
px_additional_activity_handler?: AdditionalActivityHandler<Req, Res>;
|
|
79
75
|
px_enrich_custom_parameters?: CustomParametersFunction<Req, Res>;
|
|
80
76
|
px_login_successful_custom_callback?: CustomLoginSuccessfulCallback<Res>;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { IUrl, IUrlSearchParams } from '../../utils';
|
|
1
|
+
import { IUrl, IUrlSearchParams, IUrlUtils } from '../../utils';
|
|
2
2
|
export declare class UrlImpl implements IUrl {
|
|
3
3
|
protocol: string;
|
|
4
4
|
hostname: string;
|
|
5
5
|
pathname: string;
|
|
6
6
|
search: string;
|
|
7
7
|
hash: string;
|
|
8
|
+
protected username: string;
|
|
9
|
+
protected password: string;
|
|
8
10
|
protected _port: string;
|
|
11
|
+
protected urlUtils: IUrlUtils;
|
|
9
12
|
constructor(rawUrl: string);
|
|
10
13
|
get href(): string;
|
|
11
14
|
get origin(): string;
|
|
@@ -15,4 +18,5 @@ export declare class UrlImpl implements IUrl {
|
|
|
15
18
|
set port(port: string);
|
|
16
19
|
get searchParams(): IUrlSearchParams;
|
|
17
20
|
private isDefaultPort;
|
|
21
|
+
private get credentials();
|
|
18
22
|
}
|
|
@@ -14,4 +14,5 @@ export declare abstract class LoggerBase implements ILogger {
|
|
|
14
14
|
protected logDebug(message: string): void;
|
|
15
15
|
getLogs(): LogRecord[];
|
|
16
16
|
protected recordLog(message: string, loggerSeverity: LoggerSeverity, metadata?: Record<string, any>): void;
|
|
17
|
+
clearLogs(): void;
|
|
17
18
|
}
|
|
@@ -2,8 +2,10 @@ import { IContext } from '../../context';
|
|
|
2
2
|
import { IProduct } from '../../products';
|
|
3
3
|
import { IPhase } from '../IPhase';
|
|
4
4
|
import { PhaseResult } from '../PhaseResult';
|
|
5
|
+
import { IConfiguration } from '../../config';
|
|
5
6
|
export declare class ModifyOutgoingResponsePhase<Req, Res> implements IPhase<Req, Res> {
|
|
7
|
+
protected readonly config: IConfiguration<Req, Res>;
|
|
6
8
|
protected readonly products: IProduct<any, Req, Res>[];
|
|
7
|
-
constructor(products: IProduct<any, Req, Res>[]);
|
|
9
|
+
constructor(config: IConfiguration<Req, Res>, products: IProduct<any, Req, Res>[]);
|
|
8
10
|
execute(context: IContext<Req, Res>): Promise<PhaseResult>;
|
|
9
11
|
}
|