Skip to content

Commit

Permalink
feat(packages/sui-ssr): improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabrina committed Oct 19, 2023
1 parent 2024dad commit 18c7deb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
6 changes: 3 additions & 3 deletions packages/sui-ssr/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import {
import ssrConf from './config.js'
noOPConsole(console)

// if (process.env.CONSOLE) {
console._restore()
// }
if (process.env.CONSOLE) {
console._restore()
}

const app = express()

Expand Down
7 changes: 2 additions & 5 deletions packages/sui-ssr/server/middlewares/ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,12 @@ export default async (req, res, next) => {
const {bodyAttributes, headString, htmlAttributes} =
renderHeadTagsToString(headTags)

res.set({
'Content-Security-Policy-Report-Only': `default-src 'self'; report-uri ${CSP_REPORT_PATH}`
})

res.set({
'Server-Timing': formatServerTimingHeader({
...performance,
...ssrPerformance
})
}),
'Content-Security-Policy-Report-Only': `default-src 'self'; report-uri ${CSP_REPORT_PATH}`
})
res.write(HtmlBuilder.buildHead({headTplPart, headString, htmlAttributes}))
res.flush()
Expand Down

0 comments on commit 18c7deb

Please sign in to comment.