Accept All Cookies via HttpClient

后端 未结 2 693
陌清茗
陌清茗 2020-12-10 10:03

So this is currently how my app is set up:

1.) Login Activity. 2.) Once logged in, other activities may be fired up that use PHP scripts that require the cookies sen

2条回答
  •  余生分开走
    2020-12-10 10:10

    The issue that you are facing seems to be by design for privacy/security purpose. In general any resource is not allowed to set a cookie it will not be able to receive. Here you are trying to set the cookie with the path trackallthethings from the resource /mobile-api/login.php which obviously is not working.

    Here you have following two options

    1. Set the cookie with the path which is accessible to both the resources (this may be root '/') OR
    2. Define a custom cookie policy and Registering your own cookie support. Here is related documentation and example.

    Hope this helps.

提交回复
热议问题