EdgeScript provides built-in functions across multiple categories, including string manipulation, request processing, cryptography, and more.
|
Function Classification |
Function |
|
and, or, not, eq, ne, and null |
|
|
add, sub, mul, div, mod, gt, ge, lt, le, floor, and ceil |
|
|
substr, concat, upper, lower, len, byte, match_re, capture_re, gsub_re, split, split_as_key, tohex, tostring, tochar, reverse, find, format, tobin, and trim |
|
|
set, get, foreach, and del |
|
|
add_req_header, del_req_header, add_rsp_header, del_rsp_header, encode_args, decode_args, rewrite, say, print, exit, get_rsp_header, and add_rsp_cookie. |
|
|
limit_rate_after and limit_rate |
|
|
set_cache_ttl |
|
|
today, time, now, localtime, utctime, cookie_time, http_time, parse_http_time, and unixtime |
|
|
aes_new, aes_enc, aes_dec, sha1, sha2, hmac, hmac_sha1, md5, and md5_bin |
|
|
json_enc and json_dec |
|
|
base64_enc, base64_dec, url_escape, url_unescape, rand, rand_hit, crc, tonumber, base64_enc_safe, base64_dec_safe, and randomseed |
|
|
arr_concat, arr_insert, arr_remove, arr_sort, and arr_len |
|
|
server_addr, server_port, client_addr, client_country, client_region, client_isp, ip_country, ip_region, ip_isp, req_uri, req_uri_basename, req_uri_ext, req_uri_seg, req_uri_arg, req_uri_query_string, req_scheme, req_method, req_host, req_user_agent, req_referer, req_cookie, req_first_x_forwarded, req_header, and req_id. |