You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ksch10bob (via GitHub)" <gi...@apache.org> on 2023/01/28 10:17:12 UTC

[GitHub] [cordova-android] ksch10bob commented on issue #1548: $.ajax POST returning “status”:403,“ with cordova android@9.1.0 and Android Target API level to 31

ksch10bob commented on issue #1548:
URL: https://github.com/apache/cordova-android/issues/1548#issuecomment-1407366872

   @sathishavunoori 
   I assume the following
   
   * the endpoint you try to consume is protected 
   * the authentication against the endpoint is based on cookies
   
   I ran into the same problem meaning:
   * cordova-android 9.0.0
   * config.xml ```<preference name="android-targetSdkVersion" value="30" />```  everything works
   * config.xml ```<preference name="android-targetSdkVersion" value="31" />```  getting 403 
   
   If you target Api Level 31 a lot of Android Devices apply the stricter rule of handling SameSite Cookies
   It is nothing the cordova core can do about it. It is just a stricter cookie policy that is applied from the android system webview.
   
   Please check the cookie section in chrome Debugger:
   * for API 30 Build
   * for API 31 Build
   and compare the cookies that are send with the request.
   Iam sure some essential session cookies are not sent, because they violate samesite policy.
   
   Make sure to check the show filtere cookies checkbox 
   ![image](https://user-images.githubusercontent.com/17985877/215260957-407a675f-462c-45e6-9cbf-3be4cf8813ad.png)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org