http-server
Run HTTP server
Example
action:
http-server:
address: http://httpbin.org/get
Field Name | Description | Type | Default |
---|---|---|---|
address | Bind address | string | - |
path | Url path on which to accept queries | string | / |
content-type | Content type to return with response | string | - |
cert | Path to the TLS certificate to be used (TLS requires both cert and key to be valid) | path | - |
key | Path to the TLS private to be used (TLS requires both cert and key to be valid) | path | - |
body | Allows specifying exactly what is returned | templated text | - |
address
Bind address
Type: string
Example
action:
http-server:
address: 127.0.0.1:8000
path
Url path on which to accept queries
Type: string
Example
action:
http-server:
address: 127.0.0.1:8000
path: /foo/bar
content-type
Content type to return with response
Type: string
Example
action:
http-server:
address: 127.0.0.1:8000
content-type: application/text
body: some text
cert
Path to the TLS certificate to be used (TLS requires both cert
and key
to be valid)
Type: path
Example
action:
http-server:
address: 0.0.0.0:8000
cert: /etc/letsencrypt/live/dist.panoptix.io/fullchain.pem
key: /etc/letsencrypt/live/dist.panoptix.io/privkey.pem
key
Path to the TLS private to be used (TLS requires both cert
and key
to be valid)
Type: path
body
Allows specifying exactly what is returned
When not specified, the body returned is the whole event. May contain event field expansions.
Type: templated text
Example
action:
http-server:
body: '${_raw}'
address: 127.0.0.1:8000