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 9bc1af3 commit e67d43e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion favicon.svg

This file was deleted.

1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<meta name="keywords" content="Game Engine, WebAssembly, C++, SDL, Lua, Carimbo">
<meta name="author" content="Rodrigo Delduca">
<base href="{{ .BaseURL }}" />
<link rel="icon" href="favicon.svg" type="image/svg+xml" sizes="any">
<link rel="preload" href="bundle.7z" as="fetch" type="application/octet-stream" crossorigin />
<link rel="preload" href="carimbo.wasm" as="fetch" type="application/wasm" crossorigin />
<script defer src="carimbo.js"></script>
Expand Down
9 changes: 0 additions & 9 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ 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 @@ -208,12 +206,6 @@ func indexHandler(c echo.Context) error {
return nil
}

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", favicon)
}

func javaScriptHandler(c echo.Context) error {
p := Params{}
if err := c.Bind(&p); err != nil {
Expand Down Expand Up @@ -337,7 +329,6 @@ func main() {
e.GET("/:runtime/:org/:repo/:release/:format/carimbo.js", javaScriptHandler)
e.GET("/:runtime/:org/:repo/:release/:format/carimbo.wasm", webAssemblyHandler)
e.GET("/:runtime/:org/:repo/:release/:format/bundle.7z", bundleHandler)
e.GET("/:runtime/:org/:repo/:release/:format/favicon.svg", favIconHandler)
e.GET("/:runtime/:org/:repo/:release/:format/assets/*", assetsHandler(assets))

e.Logger.Fatal(e.Start(fmt.Sprintf(":%s", os.Getenv("PORT"))))
Expand Down

0 comments on commit e67d43e

Please sign in to comment.