Hex Decode Function Unavailable



  • Squee

    Hi skidder,

    We have had customer requests to add a hex encoding/decoding function to Fastly in the past. We do have a ticket in with engineering, but it looks like it's currently in their backlog. I'll definitely add this request to the ticket so they know this is still an actively requested feature.

    In the mean time, I'm not sure how your hex-encoded URL signature is set up, but if it happens to be built off of a time stamp, we do have time.hex_to_time()

    And, as always, we encourage you to reach out to our support team at support@fastly.com with any specific questions so we might be able to help you find a solution.

    Comment actions Permalink
  • Colin Bendell

    Found a clever way to get hex decode since vcl support urldecode:

    declare local var.foo STRING;

    set var.foo ="636F6C696E";
    set var.foo = regsuball(var.foo, "(..)", "%25\1");

    #will yield "colin"
    log urldecode(var.foo);


    Comment actions Permalink

Please sign in to leave a comment.