Skip to content

Commit 569dadb

Browse files
authored
add InspectConfig type (#1274)
1 parent e12ab47 commit 569dadb

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

types/security.d.ts

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ declare module 'fastly:security' {
22
/**
33
* Inspect a Request using the [Fastly Next-Gen WAF](https://docs.fastly.com/en/ngwaf/).
44
*/
5-
export function inspect(request: Request): InspectResponse;
5+
export function inspect(
6+
request: Request,
7+
config: InspectConfig,
8+
): InspectResponse;
69

710
/**
811
* Results of asking Security to inspect a Request.
@@ -29,3 +32,30 @@ declare module 'fastly:security' {
2932
Unauthorized = 'unauthorized',
3033
}
3134
}
35+
36+
/**
37+
* Configuration object for `inspect`.
38+
*/
39+
export interface InspectConfig {
40+
/**
41+
* Set a corp name for the configuration.
42+
*
43+
* This is currently required but will be made optional in the future.
44+
*/
45+
corp: string;
46+
/**
47+
* Set a workspace name for the configuration.
48+
*
49+
* This is currently required but will be made optional in the future.
50+
*/
51+
workspace: string;
52+
/**
53+
* Specify an explicit client IP address to inspect.
54+
*
55+
* By default, `inspect` will use the IP address that made the request to the
56+
* running Compute service, but you may want to use a different IP when
57+
* service chaining or if requests are proxied from outside of Fastly’s
58+
* network.
59+
*/
60+
overrideClientIp?: string;
61+
}

0 commit comments

Comments
 (0)