ExtJS and Ajax with SSL (https)

I have an ExtJS application on top of a Django application, and I need to send a message to /accounts/logout/ to cancel the session and then redirect to / .

The code below runs locally, but does not execute on a real site that has SSL. I have a problem with performing AJAX POST through ExtJS. The code is as follows:

 Ext.Ajax.request({ url: '/accounts/logout/', withCredentials: true, method: 'POST', success: function() { console.log('successfully logged out'); window.location.href='/' } }); 

Response status in Chrome (cancelled) , as shown in this screenshot: enter image description here

In addition, I get this warning at the console level:

The https://domain.example.com/ page displays insecure content from http://console.pharmacy.com.mt/ .

Am I missing any configuration object with Ext.Ajax request above?

+4
source share
1 answer

try removing withCredentials: true

 Ext.Ajax.request({ url: '/accounts/logout/', method: 'POST', success: function() { console.log('successfully logged out'); window.location.href='/' } }); 
0
source

Source: https://habr.com/ru/post/1481659/


All Articles