✌️
This commit is contained in:
		
							parent
							
								
									5d9b46299c
								
							
						
					
					
						commit
						58f124e4fc
					
				
					 2 changed files with 8 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -31,7 +31,9 @@ const router = new Router();
 | 
			
		|||
//#region static assets
 | 
			
		||||
 | 
			
		||||
router.get('/assets/*', async ctx => {
 | 
			
		||||
	await send(ctx, ctx.path, {
 | 
			
		||||
	// 無圧縮スクリプトを用意するのは大変なので一時的に無効化
 | 
			
		||||
	const path = process.env.NODE_ENV == 'production' ? ctx.path.replace('raw.js', 'min.js') : ctx.path.replace('min.js', 'raw.js');
 | 
			
		||||
	await send(ctx, path, {
 | 
			
		||||
		root: client,
 | 
			
		||||
		maxage: ms('7 days'),
 | 
			
		||||
		immutable: true
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue