# RequestHeaderConfiguration

Configuration for HTTP request headers that will be passed through to the runtime.

- Source: [`aws-bedrockagentcore/lib/runtime/types.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-bedrockagentcore/lib/runtime/types.ts#L103)
- Type last changed: v2.255.0 · 19 May 2026

## Example

TypeScript:

```ts
const repository = new ecr.Repository(this, "TestRepository", {
  repositoryName: "test-agent-runtime",
});

const agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, "v1.0.0");

new agentcore.Runtime(this, 'test-runtime', {
  runtimeName: 'test_runtime',
  agentRuntimeArtifact: agentRuntimeArtifact,
  requestHeaderConfiguration: {
    allowlistedHeaders: ['X-Amzn-Bedrock-AgentCore-Runtime-Custom-H1'],
  },
});
```

Python:

```python
repository = ecr.Repository(self, "TestRepository",
    repository_name="test-agent-runtime"
)

agent_runtime_artifact = agentcore.AgentRuntimeArtifact.from_ecr_repository(repository, "v1.0.0")

agentcore.Runtime(self, "test-runtime",
    runtime_name="test_runtime",
    agent_runtime_artifact=agent_runtime_artifact,
    request_header_configuration=agentcore.RequestHeaderConfiguration(
        allowlisted_headers=["X-Amzn-Bedrock-AgentCore-Runtime-Custom-H1"]
    )
)
```

Java:

```java
Repository repository = Repository.Builder.create(this, "TestRepository")
        .repositoryName("test-agent-runtime")
        .build();

AgentRuntimeArtifact agentRuntimeArtifact = AgentRuntimeArtifact.fromEcrRepository(repository, "v1.0.0");

Runtime.Builder.create(this, "test-runtime")
        .runtimeName("test_runtime")
        .agentRuntimeArtifact(agentRuntimeArtifact)
        .requestHeaderConfiguration(RequestHeaderConfiguration.builder()
                .allowlistedHeaders(List.of("X-Amzn-Bedrock-AgentCore-Runtime-Custom-H1"))
                .build())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
var repository = new Repository(this, "TestRepository", new RepositoryProps {
    RepositoryName = "test-agent-runtime"
});

var agentRuntimeArtifact = AgentRuntimeArtifact.FromEcrRepository(repository, "v1.0.0");

new Runtime(this, "test-runtime", new RuntimeProps {
    RuntimeName = "test_runtime",
    AgentRuntimeArtifact = agentRuntimeArtifact,
    RequestHeaderConfiguration = new RequestHeaderConfiguration {
        AllowlistedHeaders = new [] { "X-Amzn-Bedrock-AgentCore-Runtime-Custom-H1" }
    }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
repository := ecr.NewRepository(this, jsii.String("TestRepository"), &RepositoryProps{
	RepositoryName: jsii.String("test-agent-runtime"),
})

agentRuntimeArtifact := agentcore.AgentRuntimeArtifact_FromEcrRepository(repository, jsii.String("v1.0.0"))

agentcore.NewRuntime(this, jsii.String("test-runtime"), &RuntimeProps{
	RuntimeName: jsii.String("test_runtime"),
	AgentRuntimeArtifact: agentRuntimeArtifact,
	RequestHeaderConfiguration: &RequestHeaderConfiguration{
		AllowlistedHeaders: []*string{
			jsii.String("X-Amzn-Bedrock-AgentCore-Runtime-Custom-H1"),
		},
	},
})
```

## Properties

- `allowlistedHeaders`: string[] — A list of HTTP request headers that are allowed to be passed through to the runtime.

  **Default:** No request headers allowed
