added Content-Security-Policy header to download image api to prevent malicious code injection
This commit is contained in:
		
							parent
							
								
									00381459c2
								
							
						
					
					
						commit
						b2ae6f92d1
					
				@ -300,6 +300,7 @@ public class ImageController extends BaseController {
 | 
			
		||||
        tbImageService.putETag(cacheKey, descriptor.getEtag());
 | 
			
		||||
        var result = ResponseEntity.ok()
 | 
			
		||||
                .header("Content-Type", descriptor.getMediaType())
 | 
			
		||||
                .header("Content-Security-Policy", "default-src 'none'")
 | 
			
		||||
                .eTag(descriptor.getEtag());
 | 
			
		||||
        if (!cacheKey.isPublic()) {
 | 
			
		||||
            result
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user