From 05b7ee26085a8a7c1a7a0795b77bc2907a2b22a4 Mon Sep 17 00:00:00 2001 From: Caleb Gardner Date: Sun, 2 Jul 2023 07:55:49 -0500 Subject: [PATCH] Update stupid-backend --- go.mod | 2 +- go.sum | 4 ++-- stupid.go | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 35a9cc8..81446c6 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/1lann/udp-forward v0.0.0-20191015034046-6b774a53ea39 - github.com/CalebQ42/stupid-backend v1.0.1 + github.com/CalebQ42/stupid-backend v1.1.0 github.com/CalebQ42/swassistant-backend v0.1.9 go.mongodb.org/mongo-driver v1.11.7 ) diff --git a/go.sum b/go.sum index 383941b..434a1c6 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ github.com/1lann/udp-forward v0.0.0-20191015034046-6b774a53ea39 h1:wAEqazqaAqb7wwijTl14KruBl7cvYytD3SkhXT9v5zs= github.com/1lann/udp-forward v0.0.0-20191015034046-6b774a53ea39/go.mod h1:zK6NTEHRcxPf9N4gcm0WXvE8RpsJfg/a8hMSW6dAQ0c= -github.com/CalebQ42/stupid-backend v1.0.1 h1:52hSsHOA7ZBq7aYzzieS+9R7WujYeYJuOjuCO/bz9Ks= -github.com/CalebQ42/stupid-backend v1.0.1/go.mod h1:NoawmDm79oXXxLjbVAmr5m/WIAOnRbiRf7a3tzA6GrA= +github.com/CalebQ42/stupid-backend v1.1.0 h1:cbi1Ly8xE17jNmXwUdGs++IUOn86Je8lQ8NUOIRkXFI= +github.com/CalebQ42/stupid-backend v1.1.0/go.mod h1:NoawmDm79oXXxLjbVAmr5m/WIAOnRbiRf7a3tzA6GrA= github.com/CalebQ42/swassistant-backend v0.1.9 h1:Baw43u0Be4RTzbGQU0Ztt/mw5yFf/MHKuxBnXf76fYs= github.com/CalebQ42/swassistant-backend v0.1.9/go.mod h1:gpAbuc32KvDau4J7pERnim989YTT0QvhFJeral50GpM= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/stupid.go b/stupid.go index f01a628..98652a3 100644 --- a/stupid.go +++ b/stupid.go @@ -33,7 +33,7 @@ func setupStupid(keyPath, mongoStr string) error { "swassistant": swassistantbackend.NewSWBackend(client), "cdr": defaultapp.NewDefaultApp(client.Database("cdr")), "darkstormtech": darkstormtech.NewDarkstormTech(client, filepath.Join(flag.Arg(0), "files")), - }) + }, "https://darkstorm.tech") users := true var pub, priv []byte stupidPubFil, err := os.Open(keyPath + "/stupid-pub.key") @@ -61,7 +61,6 @@ func setupStupid(keyPath, mongoStr string) error { if users { stupid.EnableUserAuth(db.NewMongoTable(client.Database("stupid").Collection("keys")), pub, priv) } - stupid.SetHeaderValues(map[string]string{"Access-Control-Allow-Origin": "*"}) http.Handle("api.darkstorm.tech/", stupid) return nil }