Level 1
You can try to add storage/uploads path into your config/cors.php file
<?php
return [
'paths' => ['api/*', 'sanctum/csrf-cookie', 'storage/uploads'],
// ...
];
I need to allow CORS in storage folder, to be specific storage/app/public/uploads and all it's subfolders.
I tried to put into public/.htaccess this and similar variations of this, but nothing works. When I visit file in the browser it's actual URL is example.com/storage/uploads/../.../file.json not exactly storage/app/public/uploads so I don't know if it has anything to do with it.
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "POST, GET, OPTIONS, PUT, DELETE"
Header set Access-Control-Allow-Headers "Content-Type, X-Requested-With"
</IfModule>
Please or to participate in this conversation.