Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f24cb5c commit c638800Copy full SHA for c638800
site/site.go
@@ -205,8 +205,9 @@ func (h *Handler) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
205
case reqFile == "bin" || strings.HasPrefix(reqFile, "bin/"):
206
h.handler.ServeHTTP(rw, r)
207
return
208
- // If the original file path exists we serve it.
209
- case h.exists(reqFile):
+ // If the original file path exists or requesting assets we serve it.
+ case h.exists(reqFile),
210
+ reqFile == "assets" || strings.HasPrefix(reqFile, "assets/"):
211
if ShouldCacheFile(reqFile) {
212
rw.Header().Add("Cache-Control", "public, max-age=31536000, immutable")
213
}
0 commit comments