mirror of
https://github.com/logto-io/logto.git
synced 2025-02-17 22:04:19 -05:00
refactor(core): remove the reportOnly flag (#3849)
* refactor(core): remove the reportOnly flag remove all the reportOnly flag of the CSP security headers. Bring up strict policy check * chore: add changeset add changeset
This commit is contained in:
parent
1cd854a63c
commit
ac65c8de4a
3 changed files with 8 additions and 6 deletions
8
.changeset/cool-oranges-cheer.md
Normal file
8
.changeset/cool-oranges-cheer.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
"@logto/cloud": patch
|
||||
"@logto/core": patch
|
||||
---
|
||||
|
||||
### Enable strict CSP policy check header
|
||||
|
||||
This change removes the report only flag from CSP security header settings, which will enables the strict CSP policy check for all requests.
|
|
@ -86,8 +86,6 @@ export default function withSecurityHeaders<InputContext extends RequestContext>
|
|||
frameguard: false,
|
||||
contentSecurityPolicy: {
|
||||
useDefaults: true,
|
||||
// Temporary set to report only to avoid breaking the app
|
||||
reportOnly: true,
|
||||
directives: {
|
||||
'upgrade-insecure-requests': null,
|
||||
imgSrc: ["'self'", 'data:', 'https:'],
|
||||
|
|
|
@ -76,8 +76,6 @@ export default function koaSecurityHeaders<StateT, ContextT, ResponseBodyT>(
|
|||
},
|
||||
contentSecurityPolicy: {
|
||||
useDefaults: true,
|
||||
// Temporary set to report only to avoid breaking the app
|
||||
reportOnly: true,
|
||||
directives: {
|
||||
'upgrade-insecure-requests': null,
|
||||
imgSrc: ["'self'", 'data:', 'https:'],
|
||||
|
@ -103,8 +101,6 @@ export default function koaSecurityHeaders<StateT, ContextT, ResponseBodyT>(
|
|||
frameguard: false,
|
||||
contentSecurityPolicy: {
|
||||
useDefaults: true,
|
||||
// Temporary set to report only to avoid breaking the app
|
||||
reportOnly: true,
|
||||
directives: {
|
||||
'upgrade-insecure-requests': null,
|
||||
imgSrc: ["'self'", 'data:', 'https:'],
|
||||
|
|
Loading…
Add table
Reference in a new issue