top | item 41695976

Go's embed.FS and http.FileServer interact unexpectedly

2 points| iron4o | 1 year ago |listen-to-euterpe.eu

3 comments

order

iron4o|1 year ago

I've noticed that browser caching with Last-Modified and If-Modified-Since is not working on my projects where embed.FS and http.FileServer are used. Which is quite a lot of them.

I guess that my investigation and solution may be helpful to others.

is_taken|1 year ago

Maybe wrapfs.WithModTime(... should not use time.Now() but get the mod time of the running binary?