# InterceptorOptions

Options for configuring an interceptor.

Used as argument in: [LambdaInterceptor.forRequest](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.LambdaInterceptor.html#forrequest), [LambdaInterceptor.forResponse](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.LambdaInterceptor.html#forresponse)

- Source: [`lib/gateway/interceptor.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-bedrock-agentcore-alpha/lib/gateway/interceptor.ts#L35)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as bedrock_agentcore_alpha from '@aws-cdk/aws-bedrock-agentcore-alpha';
const interceptorOptions: bedrock_agentcore_alpha.InterceptorOptions = {
  passRequestHeaders: false,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_bedrock_agentcore_alpha as bedrock_agentcore_alpha

interceptor_options = bedrock_agentcore_alpha.InterceptorOptions(
    pass_request_headers=False
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrock.agentcore.alpha.*;

InterceptorOptions interceptorOptions = InterceptorOptions.builder()
        .passRequestHeaders(false)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.Bedrock.Agentcore.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock.Agentcore.Alpha;

var interceptorOptions = new InterceptorOptions {
    PassRequestHeaders = false
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import bedrock_agentcore_alpha "github.com/aws/aws-cdk-go/awsbedrockagentcorealpha"

interceptorOptions := &InterceptorOptions{
	PassRequestHeaders: jsii.Boolean(false),
}
```

## Properties

- `passRequestHeaders`: boolean — Whether to pass request headers to the interceptor Lambda function.

  **Default:** false - Headers are not passed to interceptor for security

  **Security Warning**: Request headers can contain sensitive information such as
  authentication tokens and credentials. Only enable this if your interceptor needs
  access to headers and you have verified that sensitive information is not logged
  or exposed.
