feat: improve security headers and csp nonce handling
This commit is contained in:
@@ -18,7 +18,7 @@ function addPWAHeaders() {
|
||||
function addPWAScripts() {
|
||||
?>
|
||||
<!-- PWA Service Worker -->
|
||||
<script>
|
||||
<script nonce="<?php echo getCspNonce(); ?>">
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', function() {
|
||||
navigator.serviceWorker.register('/sw.js')
|
||||
|
||||
Reference in New Issue
Block a user