02 September, 2023
01 September, 2023
MJML to HTML using PHP
Programing Coderfunda
September 01, 2023
No comments
31 August, 2023
Taking mean of consequitive non NA values in data table in R
Programing Coderfunda
August 31, 2023
No comments
How to group json objects by using keys of sub value objects using jq
Programing Coderfunda
August 31, 2023
No comments
30 August, 2023
Generate Saloon SDKs from Postman or OpenAPI
Programing Coderfunda
August 30, 2023
No comments
29 August, 2023
Laravel Ajax Cross-Origin Request Blocked ?
Programing Coderfunda
August 29, 2023
Ajax, Laravel
No comments
You can enable CORS in Laravel by adding the following code to the app/Http/Middleware/VerifyCsrfToken.php file:
protected $addHttpCookie = true;
protected $except = [
'/*'
];
This code tells Laravel to exclude all routes from CSRF protection, allowing cross-origin requests to be made without being blocked.
You can also use this Alternatively way.
Step 1: Install Compose Package
Alternatively, you can install the barryvdh/laravel-cors package using Composer to enable CORS in your Laravel application. This package provides a middleware that you can add to your Laravel application to allow cross-origin requests. Here are the steps to install and use the package:
Install the package using Composer:
composer require barryvdh/laravel-cors
Step 2: Add Middleware
Add the following code to the $middleware array in the app/Http/Kernel.php file:
\Barryvdh\Cors\HandleCors::class
Step 2: Configure CORS
Add the following code to the config/cors.php file to specify the domains that are allowed to make cross-origin requests:
'allowed_origins' => [
'*',
],
'allowed_methods' => [
'POST',
'GET',
'OPTIONS',
'PUT',
'PATCH',
'DELETE',
],
'allowed_headers' => [
'Content-Type',
'X-Requested-With',
'Authorization',
],
With these steps,
How to push a docker image to a local registry from job container?
Programing Coderfunda
August 29, 2023
No comments
https://some_ip_address:5000/v2/": http: server gave HTTP response to HTTPS client and the job failed...
28 August, 2023
Laravel Nova CSV Import v0.7 - Password Hashing, Random Strings and Combined Fields
Programing Coderfunda
August 28, 2023
No comments
27 August, 2023
Flutter Web: Loading data from URL fails
Programing Coderfunda
August 27, 2023
No comments
https:///api/v1/images//thumbnail-squared The host however has CORS enabled and returns a header "access-control-allow-origin" -> "*". The URL redirects a 302 to a signed google cloud storage file however. Might this be the issue?

