Update stupid-backend

This commit is contained in:
Caleb Gardner
2023-07-02 07:55:49 -05:00
parent 8c396567ed
commit 05b7ee2608
3 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ go 1.20
require ( require (
github.com/1lann/udp-forward v0.0.0-20191015034046-6b774a53ea39 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 github.com/CalebQ42/swassistant-backend v0.1.9
go.mongodb.org/mongo-driver v1.11.7 go.mongodb.org/mongo-driver v1.11.7
) )
+2 -2
View File
@@ -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 h1:wAEqazqaAqb7wwijTl14KruBl7cvYytD3SkhXT9v5zs=
github.com/1lann/udp-forward v0.0.0-20191015034046-6b774a53ea39/go.mod h1:zK6NTEHRcxPf9N4gcm0WXvE8RpsJfg/a8hMSW6dAQ0c= 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.1.0 h1:cbi1Ly8xE17jNmXwUdGs++IUOn86Je8lQ8NUOIRkXFI=
github.com/CalebQ42/stupid-backend v1.0.1/go.mod h1:NoawmDm79oXXxLjbVAmr5m/WIAOnRbiRf7a3tzA6GrA= 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 h1:Baw43u0Be4RTzbGQU0Ztt/mw5yFf/MHKuxBnXf76fYs=
github.com/CalebQ42/swassistant-backend v0.1.9/go.mod h1:gpAbuc32KvDau4J7pERnim989YTT0QvhFJeral50GpM= 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= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+1 -2
View File
@@ -33,7 +33,7 @@ func setupStupid(keyPath, mongoStr string) error {
"swassistant": swassistantbackend.NewSWBackend(client), "swassistant": swassistantbackend.NewSWBackend(client),
"cdr": defaultapp.NewDefaultApp(client.Database("cdr")), "cdr": defaultapp.NewDefaultApp(client.Database("cdr")),
"darkstormtech": darkstormtech.NewDarkstormTech(client, filepath.Join(flag.Arg(0), "files")), "darkstormtech": darkstormtech.NewDarkstormTech(client, filepath.Join(flag.Arg(0), "files")),
}) }, "https://darkstorm.tech")
users := true users := true
var pub, priv []byte var pub, priv []byte
stupidPubFil, err := os.Open(keyPath + "/stupid-pub.key") stupidPubFil, err := os.Open(keyPath + "/stupid-pub.key")
@@ -61,7 +61,6 @@ func setupStupid(keyPath, mongoStr string) error {
if users { if users {
stupid.EnableUserAuth(db.NewMongoTable(client.Database("stupid").Collection("keys")), pub, priv) 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) http.Handle("api.darkstorm.tech/", stupid)
return nil return nil
} }