title: Grails : call to public action redirects to login page
body: <p>I am making cross domain ajax call from php to grails application .</p>
  
  <p>My php script:</p>
  
  <pre><code>$uid=$_GET['uid'];
  function getData($uid)
  
  {
      $dataUrl='http://localhost:8080/profile/user/teacher?id='.$uid;
      $json=file_get_contents($dataUrl);
      print_r($json);
  
  }
  getData($uid);
  </code></pre>
  
  <p>Javascript which calls this php script is</p>
  
  <pre><code>$.getJSON('userdata.php?uid'+1,function(data){
    console.log(data);
  });
  </code></pre>
  
  <p>here when i do getJSON call it goes to login page of my application , even though i have not checking for logged in that particular method. i.e its a public method which i can access without login.</p>
  
  <p>i am using springsecurity plugin for authentication management. </p>