Skip to content

Commit

Permalink
Merge pull request #130 from codeanker/development
Browse files Browse the repository at this point in the history
1.4.2. Update content security policy in server.ts
  • Loading branch information
danielswiatek authored Mar 9, 2024
2 parents 3b0c514 + 6616129 commit 6497f68
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions api/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,18 @@ import { createContext } from './context'
import { logger } from './logger'
import cacheControl from './middleware/cache-control'
import router from './routes'
import { isProduction } from './util/is-production'

import { appRouter } from './index'

export const app = new Koa()

app.use(
helmet({
contentSecurityPolicy: isProduction(),
contentSecurityPolicy: {
directives: {
'img-src': ["'self'", 'githubusercontent.com'],
},
},
})
)
app.use(cors({ origin: '*' }))
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "codeanker-project",
"author": "CODEANKER GmbH",
"version": "1.4.1",
"version": "1.4.2",
"description": "",
"workspaces": [
"api",
Expand Down

0 comments on commit 6497f68

Please sign in to comment.