i have a facebook aplication and i am using play framework 1.2.4 as my server, i was manage to load my application in safari and in internet explorer recently by adding header to a before method
response.setHeader("P3P", "CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"");
and some javascript code , in my main loaded page.
#{if session.get("user-id") == null}
<div id="safari_cookie_hack" style="position: absolute; top: -10000px"></div>
<script>
if (document.cookie.indexOf('user-id') < 0) {
window.setTimeout(function() {
var name = 'safari_cookie_hack',
div = document.getElementById(name),
iframe = document.createElement('iframe'),
form = document.createElement('form');
iframe.name = name;
iframe.src = 'javascript:false';
div.appendChild(iframe);
form.action = location.toString();
form.method = 'POST';
form.target = name;
div.appendChild(form);
form.submit();
}, 10);
}
</script>
#{/if}
recently i wanted to add the play Security module .
all works fine BUT to safari (version 5.1.7 installed on my PC).
the first call to
Secure.checkAccess
works just fine . then finnaly redirected to my Application controller using the method
Secure.redirectToOriginalURL
in that point when i am i see that the session has the "username" parameter.
but when trying to access other pages in my application . i got no sessoin any more and redirected to login.html ... all of this since the secure module
can u help my solve this/