Search code examples
cookiessession-cookiesnetflix-zuulsetcookiezuul-testing

Create Cookie Using Zuul But Not save in Browser (Cross Domain)


Hi I am using Netflix Zuul for create cookie. I get the cookie in response header but it not show under cookies in browserCookie Creation of inside Zuul Proxy

When the response come Cookie is there with Set-Cookie in Response header

But Cookie not show under Browser -> Application -> Storage -> Cookies enter image description here

What Will be the issue


Solution

  • Fixed the issue using adding below configuration.

    Client side request should be withCredential:true property. Servicer side (Zuul) need to response with Access-Control-Allow-Credentials:true

    Note : this is Cross-site request so response origin must response origin

    Use bellow configuration for save and access cookie.

    Zuul CROSS configuration