mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Add cache control header for timestamped cover image requests
This commit is contained in:
		
							parent
							
								
									3a99cc56b7
								
							
						
					
					
						commit
						b47793c365
					
				@ -283,6 +283,9 @@ class LibraryItemController {
 | 
				
			|||||||
      return res.sendStatus(404)
 | 
					      return res.sendStatus(404)
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (req.query.ts)
 | 
				
			||||||
 | 
					      res.set('Cache-Control', 'private, max-age=86400')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (raw) { // any value
 | 
					    if (raw) { // any value
 | 
				
			||||||
      if (global.XAccel) {
 | 
					      if (global.XAccel) {
 | 
				
			||||||
        const encodedURI = encodeUriPath(global.XAccel + libraryItem.media.coverPath)
 | 
					        const encodedURI = encodeUriPath(global.XAccel + libraryItem.media.coverPath)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user