Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisCanCompute authored Aug 5, 2024
1 parent d4ba179 commit 5880029
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sources/http_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ pub struct SimpleHttpConfig {
/// Custom response headers to be added to the HTTP response
#[serde(default)]
#[configurable(metadata(docs::examples = "example_custom_response_headers()"))]
#[configurable(metadata(
docs::additional_props_description = "A custom response header key-value pair"
))]
custom_response_headers: HashMap<String, String>,

/// A list of URL query parameters to include in the log event.
Expand Down
14 changes: 14 additions & 0 deletions website/cue/reference/components/sources/base/http.cue
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,20 @@ base: components: sources: http: configuration: {
}
}
}
custom_response_headers: {
description: "Custom response headers to be added to the HTTP response"
required: false
type: object: {
examples: [{
"Access-Control-Allow-Origin": "my-cool-server"
}]
options: "*": {
description: "A custom response header key-value pair"
required: true
type: string: {}
}
}
}
decoding: {
description: "Configures how events are decoded from raw bytes."
required: false
Expand Down
14 changes: 14 additions & 0 deletions website/cue/reference/components/sources/base/http_server.cue
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,20 @@ base: components: sources: http_server: configuration: {
}
}
}
custom_response_headers: {
description: "Custom response headers to be added to the HTTP response"
required: false
type: object: {
examples: [{
"Access-Control-Allow-Origin": "my-cool-server"
}]
options: "*": {
description: "A custom response header key-value pair"
required: true
type: string: {}
}
}
}
decoding: {
description: "Configures how events are decoded from raw bytes."
required: false
Expand Down

0 comments on commit 5880029

Please sign in to comment.