mirror of
https://github.com/usememos/memos.git
synced 2025-10-09 13:56:40 +08:00
fix: pdf resource preview (#1008)
This commit is contained in:
parent
42cd93cf33
commit
2d14047c73
1 changed files with 1 additions and 1 deletions
|
@ -300,7 +300,7 @@ func (s *Server) registerResourcePublicRoutes(g *echo.Group) {
|
|||
}
|
||||
|
||||
resourceType := strings.ToLower(resource.Type)
|
||||
if strings.HasPrefix(resourceType, "text") || strings.HasPrefix(resourceType, "application") {
|
||||
if strings.HasPrefix(resourceType, "text") || (strings.HasPrefix(resourceType, "application") && resourceType != "application/pdf") {
|
||||
resourceType = echo.MIMETextPlain
|
||||
}
|
||||
c.Response().Writer.Header().Set(echo.HeaderCacheControl, "max-age=31536000, immutable")
|
||||
|
|
Loading…
Add table
Reference in a new issue