Varnish - Add parameter to end of URL

Job ID: 30694200

Budget: $10 – $30 USD

I currently have a varnish rule that does the following action:

set req.http.location = "https://" + req.http.host + req.url + "?cfcheck";

This causes an issue because if the URL already has a parameter it shows as domain.com/?param?cfcheck

Looking for for a rule that will add ?cfcheck if a parameter doesn't exist or &cfcheck if it does.
Related categories: Linux Varnish Cache