logout from coovachilli using ajax

286 views Asked by At

I have created captive portal which working for coovachilli , the login page is in cloud for example

app.paychilli.com/login.php

so when one user connected to the wifi he will redirect to this address to make login to his account . the coovachilli is in local for example

192.168.2.1

so after user login and access his account ,I want to make logout button which will allow him logout ,I want to do it with ajax , without redirect user to logout page . to logout from coovachilli

192.168.2.1/logout 

when I using ajax

$.ajax({
            type: "post",
            url: '192.168.2.1/logout',

            success: function (data) {
        alert(data);
        $('#username').val(email);
        $('#password').val(data);//$('#loginbtn').click();

            }
        });

I had this domain cross error in console , how can I solve this problem , I need to allow user logout from coovachilli without making any redirect

0

There are 0 answers