How to add a digital signature to my program?

Which reverse web proxy can rewrite URLs to add hashes to the parameters?

  • I am looking for a reverse proxy that can compute a hash across the existing query parameters and add it as a new parameter. For example: with parameters a=1&b=2, compute a hash and rewrite the URL to have a=1&b=2&signature=0123456789abcdef I'm trying to avoid writing a new server-side program to do this, if possible. Writing a script or helper program is acceptable.

  • Answer:

    Varnish Cache can do this. If you don't know Varnish it might take you an hour or so to make sense of it all. Varnish has modules, Vmods. Use the Digest VMOD (google: "digest vmod"). Then in vcl_recv you need to extract the parameters with a regex and store it in a header or a variable (if you are using the variable vmod). Then calculate the hash with the digest vmod. Add the hash to req.url and you're done.

Per Buer at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.