Welcome Guest, Not a member yet? Register   Sign In
XMLHttpRequest error and isAjax not work

i am trying to make the following request with ajax but i get an error - 
XMLHttpRequest cannot load https://api.domain.com/view?id=1&csrf_na...0524468477 due to access control checks.

my script:
    method: 'get',
data: {'id':'<?= session()->get('id') ?>','<?= csrf_token() ?>':'<?= csrf_hash() ?>'},
headers: {'X-Requested-With': 'XMLHttpRequest'},
dataType: "json",
cache: false,
success: function (data) {

url site: https://my.domain.com
PHP Code:
public function view() {

if (

/* my code */


i also think the isAjax check doesn't work either

Messages In This Thread
XMLHttpRequest error and isAjax not work - by Secux - 09-01-2021, 12:34 PM

Theme © iAndrew 2016 - Forum software by © MyBB