Fix comment (unsafe-eval isn't used in prod) (#825)
This commit is contained in:
		
							parent
							
								
									04991b4ddf
								
							
						
					
					
						commit
						30bc3b612a
					
				@ -28,8 +28,7 @@ export function middleware (request) {
 | 
				
			|||||||
    "img-src 'self' a.stacker.news m.stacker.news https: data: blob:",
 | 
					    "img-src 'self' a.stacker.news m.stacker.news https: data: blob:",
 | 
				
			||||||
    // Using nonces and strict-dynamic deploys a strict CSP.
 | 
					    // Using nonces and strict-dynamic deploys a strict CSP.
 | 
				
			||||||
    // see https://cheatsheetseries.owasp.org/cheatsheets/Content_Security_Policy_Cheat_Sheet.html#strict-policy.
 | 
					    // see https://cheatsheetseries.owasp.org/cheatsheets/Content_Security_Policy_Cheat_Sheet.html#strict-policy.
 | 
				
			||||||
    // Old browsers will ignore nonce and strict-dynamic
 | 
					    // Old browsers will ignore nonce and strict-dynamic and fallback to host-based matching and unsafe-inline
 | 
				
			||||||
    // and fallback to host matching, unsafe-inline and unsafe-eval (no protection against XSS)
 | 
					 | 
				
			||||||
    process.env.NODE_ENV === 'production'
 | 
					    process.env.NODE_ENV === 'production'
 | 
				
			||||||
      ? `script-src 'self' 'unsafe-inline' 'nonce-${nonce}' 'strict-dynamic' https:`
 | 
					      ? `script-src 'self' 'unsafe-inline' 'nonce-${nonce}' 'strict-dynamic' https:`
 | 
				
			||||||
      // unsafe-eval is required during development due to react-refresh.js
 | 
					      // unsafe-eval is required during development due to react-refresh.js
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user