set missing header
can i configure a request header transform rule to set a header if it doesnt exist?
6 Replies
e.g if the http request referer header does not exist, set it to a default value
Expression:
And then just set the header as the action

can be seen in action on https://headers.erisa.uk which is a worker that returns the request headers in the body and will default
myheader
to defaultvalue
In my expression you could swap out 
!
for not
and ==
for eq
and it would work the same
My brain tries to treat it like code so I end up using the C-like notations 