mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 09:31:53 +01:00 
			
		
		
		
	add cache-control for attachments
This commit is contained in:
		
							parent
							
								
									e67659bf8e
								
							
						
					
					
						commit
						b410207dc1
					
				| @ -345,6 +345,7 @@ func runWeb(ctx *cli.Context) { | ||||
| 			} | ||||
| 			defer fr.Close() | ||||
| 
 | ||||
| 			ctx.Header().Set("Cache-Control", "public,max-age=86400") | ||||
| 			// Fix #312. Attachments with , in their name are not handled correctly by Google Chrome. | ||||
| 			// We must put the name in " manually. | ||||
| 			if err = repo.ServeData(ctx, "\""+attach.Name+"\"", fr); err != nil { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user