CakePHP 3.9 Forbidden 403 error

CakePHP 3.9 Forbidden 403 error

GrandLotus_MaxGrandLotus_Max Posts: 1Questions: 1Answers: 0
edited October 2020 in Free community support

So I'm using the CakePHP 3.9 and using DataTables for the list of users. Whenever I try it it gives me the

403 Forbidden Error and https://datatables.net/manual/tech-notes/7 datatables error

I also allowed the url by using CakePHP Auth.

Here is the script Im using.

<script> 
    $(document).ready(function(){
        let datatable = $("#main-table").DataTable({
            'processing': true,
            "serverSide": true,
            "paginate": true,
            "ajax": {
                'url': '/datatables',
                'type': 'POST',
            },
            "columns": [
                {'data': 'ID'},
                {'data': 'code'},
                {'data': 'username'},
                {'data': 'password'},
                {'data': 'type'},
                {'data': 'created'},
                {'data': 'modified'},
            ]
        });
    });
</script>

Thanks

Answers

  • allanallan Posts: 63,468Questions: 1Answers: 10,466 Site admin

    Does CakePHP require a CSRF token perhaps? You'd probably need to ask in a CakePHP forum beyond that though, as I'm afraid I've not used it much.

    Allan

This discussion has been closed.