Skip to content

Commit

Permalink
trying to get cat
Browse files Browse the repository at this point in the history
  • Loading branch information
karelbilek committed May 2, 2024
1 parent c73d917 commit 91ab29c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"fmt"
"html/template"
"io"
"io/fs"
"log"
"mime"
"net/http"
Expand Down Expand Up @@ -441,7 +442,13 @@ func mainProxy() {
})

http.Handle("GET /static/", http.FileServerFS(f))
http.Handle("GET data.karelbilek.com/", http.FileServerFS(f))

subfs, err := fs.Sub(f, "static")

if err != nil {
panic(err)
}
http.Handle("GET data.karelbilek.com/", http.FileServerFS(subfs))

http.Handle("/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {

Expand Down

0 comments on commit 91ab29c

Please sign in to comment.