✏️ Updated doc comment about static serving

This commit is contained in:
Maxim Lebedev 2023-11-13 07:21:45 +06:00
parent 6fd916058d
commit 90a91c332d
Signed by: toby3d
GPG Key ID: 1F14E25B7C119FC5
1 changed files with 3 additions and 3 deletions

View File

@ -102,9 +102,9 @@ func NewApp(ctx context.Context, config *domain.Config) (*App, error) {
}
// TODO(toby3d): use exists static use case or split that on static and resource modules?
// INFO(toby3d): any static file is public by design, so it's safe to search it first before
// deep down to any page or it's resource which might be secured by middleware or something
// else.
// INFO(toby3d): any static file is public and unprotected by design, so it's safe to search it
// first before deep down to any page or it's resource which might be secured by middleware or
// something else.
static, err := statics.Get(r.Context(), strings.TrimPrefix(r.URL.Path, "/"))
if err == nil {
http.ServeContent(w, r, static.Name(), domain.ResourceModTime(static), static)