Skip to content

Commit 78051ff

Browse files
committed
Remove now-unused function
1 parent cd07056 commit 78051ff

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

site/embed.go

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -137,25 +137,6 @@ func serveFiles(fileSystem fs.FS, logger slog.Logger) (http.HandlerFunc, error)
137137
return serveFunc, nil
138138
}
139139

140-
// FileHandler serves static content, additionally adding immutable
141-
// cache-control headers for Next.js content
142-
/*func FileHandler(fileSystem fs.FS) func(writer http.ResponseWriter, request *http.Request) {
143-
// Non-HTML files don't have special routing rules, so we can just leverage
144-
// the built-in http.FileServer for it.
145-
fileHandler := http.FileServer(http.FS(fileSystem))
146-
147-
return func(writer http.ResponseWriter, request *http.Request) {
148-
// All our assets - JavaScript, CSS, images - should be cached.
149-
// For cases like JavaScript, we rely on a cache-busting strategy whenever
150-
// there is a new version (this is handled in our webpack config).
151-
if !strings.HasSuffix(request.URL.Path, ".html") && !strings. {
152-
writer.Header().Add("Cache-Control", "public, max-age=31536000, immutable")
153-
}
154-
155-
fileHandler.ServeHTTP(writer, request)
156-
}
157-
}*/
158-
159140
type htmlState struct {
160141
CSP cspState
161142
CSRF csrfState

0 commit comments

Comments
 (0)