I have…
- [x] Read the following guideline: https://docs.squidex.io/01-getting-started/installation/troubleshooting-and-support. I understand that my support request might get deleted if I do not follow the guideline.
I’m submitting a…
- [ ] Regression (a behavior that stopped working in a new release)
- [ ] Bug report
- [ ] Performance issue
- [x] Documentation issue or request
Current behavior
I am unable to create valid Liquid syntax for Custom Headers of Webhook Rule.
In the payload field the Liquid syntax works as expected, e.g.
MyPayload={{event.timestamp}}
But Custom Headers do not seem to work in the same way, e.g.
MyCustomHeader={{event.timestamp}}
When I run simulations against such a rule the ActionData ‘headers’ property appears malformed, e.g.:
"headers": {
"Liquid(MyCustomHeader": "{{event.timestamp}})"
}
I have also tried:
MyCustomHeader=Liquid({{event.timestamp}})
Simulation of that rule indicates that it tried to process the Liquid syntax, but the ActionData headers property again looks incorrect:
"headers": {
"Liquid(MyCustomHeader": "2022-03-14T10:47:55Z)"
}
I have tried other variations but always the simulation looks incorrect; and triggering an actual rule results in either no custom header being present, or it sets the header using the literal liquid value without parsing it.
Expected behavior
The Liquid syntax should work for headers field in a similar way to how it works for the payload field.
I want to use the reference function to look up some additional data, so I would expect something like the following to work:
{% reference 'ref', event.data.ToolComponent.iv.Tool[0] %}
MyCustomHeader={{ ref.data.Name.iv }}
Minimal reproduction of the problem
Create a web hook rule and try to set a value for custom headers using Liquid, e.g.
MyCustomHeader={{event.timestamp}}
Observe that
- ActionData headers property appears malformed in a simulated rule.
- No custom header is included when the rule is triggered.
Environment
App Name: test
- [ ] Self hosted with docker
- [X] Self hosted with IIS
- [ ] Self hosted with other version
- [ ] Cloud version
Version: 6.4.0.0
Browser:
- [ ] Chrome (desktop)
- [ ] Chrome (Android)
- [ ] Chrome (iOS)
- [ ] Firefox
- [ ] Safari (desktop)
- [ ] Safari (iOS)
- [ ] IE
- [X] Edge