From 13c4a755e66cbff0ac0c65eece015bddbe152ed2 Mon Sep 17 00:00:00 2001
From: Runxi Yu <me@runxiyu.org>
Date: Mon, 24 Mar 2025 01:30:53 +0800
Subject: Use a WebAssembly solver

---
 main.go | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'main.go')

diff --git a/main.go b/main.go
index 73808d8..98f34bf 100644
--- a/main.go
+++ b/main.go
@@ -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) {
-- 
cgit v1.2.3