Skip to content

Add crossorigin anonymus to the mix configuration because it's not possible to use with a CDN for all the resources #1468

Closed
@dantes4ur

Description

@dantes4ur

Telescope Version

5.0.1

Laravel Version

10.48.4

PHP Version

8.2

Database Driver & Version

MySQL 8

Description

Previously, there were no problems of using telescope without this attribute crossorigin="anonymous" on link or script tags. But right now I found a weird problem regarding the script and styles tag if it's consumed from a CDN.

The error:

Subresource Integrity:
The resource 'https://cdn.domain.com/vendor/telescope/styles.css' has an integrity attribute, but the resource requires the request to be CORS enabled to check the integrity, and it is not. The resource has been blocked because the
integrity cannot be enforced.

What I found:
https://stackoverflow.com/questions/35323268/how-to-solve-resource-requires-the-request-to-be-cors-enabled-resource-has-bee

I think that is related with the webpack configuration on the production files in the package.
https://webpack.js.org/configuration/output/

Steps To Reproduce

Upload your assets to CDN (other domain) and then try to load from a https domain (preferably not local) and then you'll see that your telescope page does not render as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions