Panel domain - CORS Issue - Spatie Media Library File Upload

When I use $panel->domain('admin.example.test') I get following error

Access to fetch at 'https://example.test/storage/1/mWYF1pIRZoK9jwFPajd7FCdDN2kdua-metaYXV0aG9yLWJhbm5lci5qcGc=-.jpg' from origin 'https://admin.example.test' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

but it works when I remove ->domain() and use ->path().

How can I make it work?
Was this page helpful?