Skip to content

Module import requires unsafe-eval in script content security policy directive #115

@ghost

Description

I'm trying to import the module in an Electron application with a recommended Content Security Policy of script-src 'self' but it prevents loading of the module with the error below.

screenshot-20200427033648160881813

It loads if I add 'unsafe-eval' to the policy, but I get reminded of the security risk.

screenshot-20200427033704155928453

Is there a way around this or should an Electron application use the dgraph-js-http package instead? I've read in this blog post that "For many use cases, the difference in performance is negligible".

Would that apply to an Electron application using a single Dgraph instance locally?

dgraph-js: 20.3.0

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