Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
skhaz committed Nov 26, 2023
1 parent cf98aad commit 9bc1af3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ type Cache struct {
var (
//go:embed index.html
html []byte
//go:embed favicon.svg
favicon []byte
//go:embed assets
assets embed.FS
cache Cache
Expand Down Expand Up @@ -209,7 +211,7 @@ func indexHandler(c echo.Context) error {
func favIconHandler(c echo.Context) error {
c.Response().Header().Set("Cache-Control", "public, max-age=31536000, s-maxage=31536000")
c.Response().Header().Set("Expires", time.Now().AddDate(1, 0, 0).Format(http.TimeFormat))
return c.Blob(http.StatusOK, "image/svg+xml", []byte{})
return c.Blob(http.StatusOK, "image/svg+xml", favicon)
}

func javaScriptHandler(c echo.Context) error {
Expand Down

0 comments on commit 9bc1af3

Please sign in to comment.