all repos — homestead @ 253cb999adcc8151af0888e6188aacb1420a73c9

Code for my website

serve files from Storage implementation

Alan Pearce
commit

253cb999adcc8151af0888e6188aacb1420a73c9

parent

97082ddc687eb1a9279addf0370a94bdf94f1862

1 file changed, 2 insertions(+), 2 deletions(-)

changed files
M internal/website/mux.gointernal/website/mux.go
@@ -83,9 +83,9 @@ enc := nego.NegotiateContentEncoding(r, file.AvailableEncodings()...)
switch enc { case "br", "gzip": w.Header().Add("Content-Encoding", enc) - w.Header().Add("Content-Type", file.ContentType) } - http.ServeFile(w, r, file.Alternatives[enc]) + w.Header().Add("Content-Type", file.ContentType) + http.ServeContent(w, r, file.Path, file.LastModified, file.Encodings[enc]) return nil }, log))