Skip to content

how can I allow unsafe-eval only while I use pug  #3452

@maa-wtag

Description

@maa-wtag

In one of my project written in reactjs I am using pug to render some pdf templates in my application. But it is causing issues in CSP policies as pug uses eval to generate forms from template, which is not allowed. In the console it shows me this error while I run the app.
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'".
My question is if there are any way I can bypass this issue while rendering pug files in my app or is it not possible at all by default while using pug.

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