http:
enabled: false
input:
http_server:
address: 0.0.0.0:61210
allowed_verbs:
- POST
- GET
path: /
rate_limit: ""
timeout: 60s
sync_response:
headers:
Content-Type: application/text;charset=utf-8
status: "200"
pipeline:
processors:
- mapping: |
let body = content().string().catch(null)
meta request_body = $body
let body = this.catch(null)
let factoryNo = if $body.werks != null && $body.werks != "" {
$body.werks
} else if $body.WERKS != null && $body.WERKS != "" {
$body.WERKS
} else if $body.factoryNo != null && $body.factoryNo != "" {
$body.factoryNo
}
meta factoryNo = $factoryNo
meta F0001 = "172.32.6.25"
meta F0002 = "172.32.6.184"
meta dynamic_host = if $factoryNo == "F0001" {@F0001} else if
output: sync_response: headers: Content-Type: application/json status: "200"