skip to Main Content

Method 'POST' error 419 on local server Laravel

When i submit a post form on my page it doesn't work, it redirects me on the action route with error 419, this is an example of my form: <form action="{{route('client.login')}}" method="POST"> @csrf @method('POST') <h4 class="login-title">Login</h4> <div class="login-form"> <div class="row">…

VIEW QUESTION

Turn on CSRF protection for a group of GET routes in Laravel

I have the following group of GET routes on Laravel: Route::get('/location/get', 'Ajax@getProducts'); Route::get('/products/get', 'Ajax@getProducts'); Route::get('/schedule/get', 'Ajax@getProducts'); I want to protect those routes with the automatically generated CSRF token from Laravel. I have read some workarounds about overriding method: VerifyCsrfToken@isReading(...), but…

VIEW QUESTION

CSRF token mismatch.", exception: "SymfonyComponentHttpKernelExceptionHttpException – Jquery

function edit_expense(val){ var id = val; var amount = $('#expense_amount_'+id).val(); var image = $('#img_file_'+id)[0].files[0]; $.ajax ({ type:'post', url:'{{route('edit_expense')}}', headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, processData: false, contentType: false, data: { "_token": "{{ csrf_token() }}",'id':id, 'amount': amount,'image': image }, success:function(data) { $('.revnue_updated').removeClass('d-none');…

VIEW QUESTION

Why is YouTube making requests to ourdomain.example.com/error_204 – Magento

We have a WordPress blog running under via a reverse Proxy under ourdomain.example.com/blog which embeds YouTube videos. Now we are seeing requests in the chrome network tab to POST https://ourdomain.example.com/error_204?a=logerror&t=jserror&type=SyntaxError&msg=Failed%20to%20execute%20%27postMessage%27%20on%20%27Window%27%3A%20Invalid%20target%20origin%20%27data%3A%27%20in%20a%20call%20to%20%27postMessage%27.&line=Not%20available&level=WARNING&client.name=1 This requests lead to problems in our main software (Magento,…

VIEW QUESTION
Back To Top
Search