Hi,
I have a single page application (SPA) on a domain
a.domain.com (http) that connect to an api on
b.otherdomain.com (https) build in Play 2 (scala).
The /login set the Play cookie and the following request are well authenticated.
Everything works on Chrome and Firefox (not IE because of CORS restrictions). It shoiuld work on Safari but after the /login call, the cookie is not sent back with the following requests, so play returns "401 not authorized" responses.
Is this a bug or a misconfiguration on my server side ?
Do I have to change application.session.httpOnly and application.session.secure ?
Here is what I see from the Safari inspector :
URL de la requête:
https://b.otherdomain.com//login
Méthode de la requête:
POST
Code d’état:
200 OK
- En-têtes de requêteafficher la source
Accept:
application/json, text/plain, */*
Content-Type:
application/x-www-form-urlencoded
Origin:
Referer:
User-Agent:
Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2
- Données du formulaireafficher l’URL codée
email:
password: foofoo
- En-têtes de réponseafficher la source
Access-Control-Allow-Credentials:
true
Access-Control-Allow-Origin:
Connection:
keep-alive
Content-Length:
31
Content-Type:
text/plain; charset=utf-8
Set-Cookie:
PLAY_SESSION=a71f93e3315fa9164dd7112841ccdb4a0f0c447b-sessionId%3A6gtu7%21z.5i%218d%29v8yxy693n-s6zsuejpav_p67f9hb%7Ej%274h2de*jx3g35p%7Egzo0u;Path=/;HTTPOnly
Strict-Transport-Security:
max-age=31536000
URL de la requête:
Méthode de la requête:
GET
Code d’état:
401 Unauthorized
- En-têtes de requêteafficher la source
Accept:
application/json, text/plain, */*
Origin:
Referer:
User-Agent:
Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2
- En-têtes de réponseafficher la source
Access-Control-Allow-Credentials:
true
Access-Control-Allow-Origin:
Connection:
keep-alive
Content-Length:
24
Content-Type:
text/plain; charset=utf-8
Strict-Transport-Security:
max-age=31536000
Thanks for your help