@things-factory/board-service 8.0.0-alpha.13 → 8.0.0-alpha.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/board-service",
3
- "version": "8.0.0-alpha.13",
3
+ "version": "8.0.0-alpha.14",
4
4
  "main": "dist-server/index.js",
5
5
  "things-factory": true,
6
6
  "author": "",
@@ -23,11 +23,11 @@
23
23
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create ./server/migrations/migration"
24
24
  },
25
25
  "dependencies": {
26
- "@things-factory/auth-base": "^8.0.0-alpha.13",
26
+ "@things-factory/auth-base": "^8.0.0-alpha.14",
27
27
  "@things-factory/env": "^8.0.0-alpha.8",
28
- "@things-factory/fav-base": "^8.0.0-alpha.13",
29
- "@things-factory/font-base": "^8.0.0-alpha.13",
30
- "@things-factory/integration-base": "^8.0.0-alpha.13",
28
+ "@things-factory/fav-base": "^8.0.0-alpha.14",
29
+ "@things-factory/font-base": "^8.0.0-alpha.14",
30
+ "@things-factory/integration-base": "^8.0.0-alpha.14",
31
31
  "@things-factory/operato-license-checker": "^4.0.4",
32
32
  "content-disposition": "^0.5.3",
33
33
  "generic-pool": "^3.8.2"
@@ -36,5 +36,5 @@
36
36
  "@thiagoelg/node-printer": "0.6.2",
37
37
  "puppeteer": "22.12.1"
38
38
  },
39
- "gitHead": "7463b015ce57714e3ebb66112d029caf54eb6ae9"
39
+ "gitHead": "a783cef577afccb62e82648f7c3c37ee82d75157"
40
40
  }
@@ -1,3 +1,5 @@
1
+ import crypto from 'crypto'
2
+
1
3
  const puppeteer = require('puppeteer')
2
4
  const { Readable } = require('stream')
3
5
  const ejs = require('ejs')
@@ -21,7 +23,10 @@ export const pdfToImage = async ({ pdfPath, fileName, extension = 'png', quality
21
23
  const pdfUrl = `${protocol}://${host}:${port}${pdfPath}`
22
24
 
23
25
  const page = await browser.newPage()
24
- const html = await ejs.render(getPdfHtmlTemplate(), { data: { pdfUrl, quality } })
26
+ const html = await ejs.render(getPdfHtmlTemplate(), {
27
+ data: { pdfUrl, quality },
28
+ nonce: crypto.randomBytes(16).toString('hex')
29
+ })
25
30
 
26
31
  // 페이지 로딩시 까지 기다리고 스크린샷
27
32
  await page.setContent(html, { waitUntil: 'networkidle0' })