http-server

Run HTTP server

Example

action:

http-server:
  address: http://httpbin.org/get

Field NameDescriptionTypeDefault
addressBind addressstring-
bodyAllows specifying exactly what is returnedexpanded-text-
pathUrl path on which to accept queriesstring/
content-typeContent type to return with responsestring-
certPath to TLS certificate (for https queries)string-
keyPath to TLS key (for https queries)string-

address

Bind address

Type: string

Example

action:

http-server:
  address: 127.0.0.1:8000

body

Allows specifying exactly what is returned

When not specified, the body returned is the whole event. May contain event field expansions.

Type: expanded-text

Example

action:

http-server:
  body: '${_raw}'
  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 TLS certificate (for https queries)

Type: string

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 TLS key (for https queries)

Type: string