Skip to content

Conversation

@1000TurquoisePogs
Copy link
Member

This PR adds the ability for plugins to request use of a csp nonce and have their primary html be a template in which the nonce value is filled in when sent. This should allow plugins such as the desktop to be able to use a nonce in csp rules. Alternative CSP settings could be added in the future to use nonce in more situations.

} else if (preset == 'frame-strict') {
return `frame-src 'self' ${req.hostname};`;
} else if (preset == 'script-nonce') {
let nonce=crypto.randomBytes(16).toString('hex');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering whether the approach with a random string would be suitable for HA mode when there are multiple app-servers running.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, probably not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready for Review

Development

Successfully merging this pull request may close these issues.

2 participants