Skip to content

Commit e67e351

Browse files
authored
Merge pull request #204 from AthennaIO/develop
chore(view): let developer decide CSP from Helmet
2 parents a9fa4bc + 35d4e79 commit e67e351

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@athenna/http",
3-
"version": "5.17.0",
3+
"version": "5.18.0",
44
"description": "The Athenna Http server. Built on top of fastify.",
55
"license": "MIT",
66
"author": "João Lenon <[email protected]>",

src/context/Response.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,9 @@ export class Response {
122122
.share({ request: this.request })
123123
.render(view, data)
124124

125-
await this.header(
126-
'Content-Security-Policy',
127-
"default-src 'self' 'unsafe-inline' 'unsafe-eval' 'img-src' 'style-src-elem' 'script-src-elem'"
125+
await this.safeHeader('Content-Type', 'text/html; charset=utf-8').send(
126+
content
128127
)
129-
.safeHeader('Content-Type', 'text/html; charset=utf-8')
130-
.send(content)
131128

132129
this.response.body = content
133130

0 commit comments

Comments
 (0)