Skip to content
This repository was archived by the owner on Nov 7, 2018. It is now read-only.
This repository was archived by the owner on Nov 7, 2018. It is now read-only.

Cookies from an iframe are not stored #197

@buryni

Description

@buryni

I charge my responsive web within an iframe. This iframe is loaded with a token and it login into webapp.

In header:

**Response**
:status: 200
Content-Type: text/html; charset=UTF-8
Pragma: no-cache
Access-Control-Allow-Credentials: true
Date: Wed, 04 Apr 2018 18:38:29 GMT
Cache-Control: no-store, no-cache, must-revalidate
Access-Control-Allow-Methods: GET, POST, OPTIONS
Server: nginx
Access-Control-Allow-Origin: *
Expires: Thu, 19 Nov 1981 08:52:00 GMT
**Set-Cookie: _PHPSESSID=5njgpr3a1sb6rbbdk255e4a8h5_; expires=Thu, 05-Apr-2018 18:38:29 GMT; Max-Age=86400; path=/**
Content-Encoding: gzip
Vary: Accept-Encoding
Access-Control-Allow-Headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type

But that cookie is not stored, so I can never enter the webapp on iOS.

This does not happen with UIWebView.
This does not happen on android.
This does not happen in any pc/mac browser (included safari)

I have seen this solution:

https://stackoverflow.com/questions/26573137/can-i-set-the-cookies-to-be-used-by-a-wkwebview

But I do not know how to implement it in my ionic v.1

ionic info

cli packages: (/Users/XXXXXXXX)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 6.5.0 

local packages:

    Cordova Platforms : android 6.1.2 ios 4.3.1
    Ionic Framework   : ionic1 1.3.1

System:

    Android SDK Tools : 25.2.5
    ios-deploy        : 1.9.2 
    Node              : v8.9.1
    npm               : 2.15.12 
    OS                : macOS High Sierra
    Xcode             : Xcode 9.3 Build version 9E145 

Environment Variables:

    ANDROID_HOME : /Users/XXXXXX/Library/Android/sdk

Misc:

    backend : pro

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions