No cache /notes/:note (#3382)
This commit is contained in:
		
							parent
							
								
									13a75abc91
								
							
						
					
					
						commit
						653ec0cbb0
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -76,7 +76,7 @@ router.get('/notes/:note', async (ctx, next) => {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ctx.body = pack(await renderNote(note, false));
 | 
						ctx.body = pack(await renderNote(note, false));
 | 
				
			||||||
	ctx.set('Cache-Control', 'public, max-age=180');
 | 
						ctx.set('Cache-Control', 'private, max-age=0, must-revalidate');
 | 
				
			||||||
	setResponseType(ctx);
 | 
						setResponseType(ctx);
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -111,7 +111,7 @@ router.get('/notes/:note', async ctx => {
 | 
				
			||||||
			note: _note,
 | 
								note: _note,
 | 
				
			||||||
			summary: getNoteSummary(_note)
 | 
								summary: getNoteSummary(_note)
 | 
				
			||||||
		});
 | 
							});
 | 
				
			||||||
		ctx.set('Cache-Control', 'public, max-age=180');
 | 
							ctx.set('Cache-Control', 'private, max-age=0, must-revalidate');
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		ctx.status = 404;
 | 
							ctx.status = 404;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue