In our application, with every request, the front end hashes the url + the data and sends them to the server. The server then verifies that the query parameters as well as the data have not been tampered. However, in the httpinterceptor, I can only view config.url and config.params. There is no way to get the absolute url, so I can't hash against it directly. How would I go about doing this? I tried something along the lines of
var url;
var params;
for (var i = 0; i < config.params.length; i++){
params+=config.params[i].name+'='+config.params[i].value;
}
url = config.url+'?'+params;
However this doesn't work because I can't seem to access the params this way. Also, how can I be sure that the params are in the same order as the request url? Obviously if it's even 1 character different, the hash won't be right.
window.location.href
? – Avraam Mavridis Oct 26 '15 at 16:14