This discussion is archived
0 Replies Latest reply: Oct 15, 2009 3:55 AM by 807574 RSS

Secure Remote Access JavaScript rewriting

807574 Newbie
Currently Being Moderated
Hi all,

I am having a little bit of trouble with the SRA Rewriting engine as it is showing some inconsistent rewriting behaviour. I have a application which uses jQuery for Ajax requests, and some of the URLs are not rewritten for these requests.

let me illustrate:
Ext.Ajax.request({
  url: 'http://application/request.action',
  params: {key: value},
  success: function() {
    ... 
  }
});
I have a rewriting rule that states:
<Variable name="url" type="URL" />
In some cases the url gets rewritten, in most cases the URL is not being rewritten. The work-around for this is to rewrite the Application code so it looks like this:
var url = 'http://application/request.action';
Ext.Ajax.request({
  url: url,
  params: {key: value},
  success: function() {
    ... 
  }
});
The thing I do not understand is why the variable url inside the request is sometimes detected... Is the sra rewriting engine able to handle variables in the following manner? I'd say yes, because it does in some cases.
{var1: 'value1', var2: 'value2'};
Anyone had any experience with this?
Thanks in advance,


Sten