ENF News Bot
Automated News Bot
- Joined
- Apr 15, 2022
- Messages
- 2,591
Cloudflare Rules supports three new functions for removing surrounding bytes. Use them to remove whitespace before comparing request values. All HTTP products support these functions on all plans:
By default, these functions remove ASCII whitespace. An optional constant string specifies a custom set of bytes.
If the input value is nil, these functions return nil.
For example, this expression removes surrounding whitespace before comparing a header value:
For details, refer to the
Continue reading...
trim()removes bytes from both ends.trim_start()removes bytes from the start.trim_end()removes bytes from the end.
By default, these functions remove ASCII whitespace. An optional constant string specifies a custom set of bytes.
If the input value is nil, these functions return nil.
For example, this expression removes surrounding whitespace before comparing a header value:
trim(http.request.headers["x-label"][0]) eq "approved"For details, refer to the
trim(), trim_start(), and trim_end() function references.Continue reading...