{"size": 540, "ext": "js", "max_stars_repo_path": "server/configurations/responseHeaderConfig.js", "max_stars_repo_name": "zk-146/quick-paper", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "server/configurations/responseHeaderConfig.js", "max_issues_repo_name": "zk-146/quick-paper", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "server/configurations/responseHeaderConfig.js", "max_forks_repo_name": "zk-146/quick-paper", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 27.0, "max_line_length": 80, "alphanum_fraction": 0.5518518519}
const helmet = require("helmet");

const responseHeaderConfig = (app) => {
  app.use(
    helmet.contentSecurityPolicy({
      directives: {
        defaultSrc: ["'none'"],
        scriptSrc: ["'self'", "'unsafe-inline'"],
        styleSrc: ["'self'", "'unsafe-inline'", "https://fonts.googleapis.com"],
        imgSrc: ["'self'", "data:"],
        fontSrc: ["'self'", "https://fonts.gstatic.com", "data:"],
        connectSrc: ["'self'"],
        reportUri: "/cspviolation",
      },
    })
  );
};

module.exports = responseHeaderConfig;
