mirror of
				https://codeberg.org/ashley/poke
				synced 2025-07-17 16:52:11 +00:00 
			
		
		
		
	add page cache owo
This commit is contained in:
		
							parent
							
								
									abba478763
								
							
						
					
					
						commit
						424a6fb789
					
				| @ -134,6 +134,15 @@ this is our config file,you can change stuff here | ||||
|       ); // cache header
 | ||||
|       res.setHeader("poketube-cacher", "STATIC_FILES"); | ||||
|     } | ||||
|      | ||||
|     const a = config.cacher_max_age + 8000 | ||||
|     if (!req.url.match(/^\/(css|js|img|font)\/.+/)) { | ||||
|       res.setHeader( | ||||
|         "Cache-Control", | ||||
|         "public, max-age=" + a | ||||
|       ); // cache header
 | ||||
|       res.setHeader("poketube-cacher", "PAGE"); | ||||
|     } | ||||
|     next(); | ||||
|   }); | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Ashley
						Ashley