Update stupid-backend
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
@@ -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=
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user