Skip to content

Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script... #1489

@madeupofstardust

Description

@madeupofstardust

Hi. I use Alasql with Teampermonkey, and in certains sites I got this error from console:

Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' '*' 'unsafe-inline' *.gstatic.com *.google.com *.googleapis.com *.bootstrapcdn.com".

Looks like the Content Security Policy in many websites doesn't allow to use unsafe eval, so Alasql doesnt't work there.

I tried with this cdns:

https://cdn.jsdelivr.net/alasql/latest/alasql.min.js

https://cdn.jsdelivr.net/npm/alasql

And I got the same error. Is there a way to solve this issue?

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