We are loading S3 Pdf file in ngx-extended-pdf-viewer (Angular). But it shows the requested domain does not have an access control header Issue.
Notes:
- Files Uploads from PHP laravel backend
- We set access control origin header for this domain on https://selvamanidevsaas.selvamani.app But the same issue again
Errors
UnknownErrorException {message: 'Failed to fetch', name: 'UnknownErrorException', details: 'TypeError: Failed to fetch'} details: "TypeError: Failed to fetch" message: "Failed to fetch" name: "UnknownErrorException"
Access to fetch at 'https://s3bucket.s3.ap-south-1.amazonaws.com/work_permit/work_permit_1657881550.pdf' from origin 'https://selvamanidevsaas.selvamani.app' 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