diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-24 01:30:53 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-24 20:39:10 +0800 |
commit | 13c4a755e66cbff0ac0c65eece015bddbe152ed2 (patch) | |
tree | 8924deb64637ced0753a7ad341bf968af2c5f94e /main.go | |
parent | tmpl.go: Separate the template into its own file (diff) | |
download | powxy-13c4a755e66cbff0ac0c65eece015bddbe152ed2.tar.gz powxy-13c4a755e66cbff0ac0c65eece015bddbe152ed2.tar.zst powxy-13c4a755e66cbff0ac0c65eece015bddbe152ed2.zip |
Use a WebAssembly solverv0.1.10
Diffstat (limited to '')
-rw-r--r-- | main.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -21,6 +21,11 @@ type tparams struct { func main() { log.Fatal(http.ListenAndServe(listenAddr, http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) { + if strings.HasPrefix(request.URL.Path, "/.powxy/") { + http.StripPrefix("/.powxy/", http.FileServer(http.FS(resourcesFS))).ServeHTTP(writer, request) + return + } + cookie, err := request.Cookie("powxy") if err != nil { if !errors.Is(err, http.ErrNoCookie) { |