Skip to content

Commit 4bf2e3f

Browse files
authored
Fix session bug (#347)
1 parent 944c049 commit 4bf2e3f

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ require (
1414
github.com/go-chi/httplog v0.2.5
1515
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
1616
github.com/google/uuid v1.3.1
17-
github.com/gorilla/mux v1.8.1
1817
github.com/gorilla/sessions v1.2.0
1918
github.com/gorilla/websocket v1.5.0
2019
github.com/icza/bitio v1.1.0

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,6 @@ github.com/googleapis/gax-go/v2 v2.11.0 h1:9V9PWXEsWnPpQhu/PeQIkS4eGzMlTLGgt80cU
455455
github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI=
456456
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
457457
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
458-
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
459-
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
460458
github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ=
461459
github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
462460
github.com/gorilla/sessions v1.2.0 h1:S7P+1Hm5V/AT9cjEcUD5uDaQSX0OE577aCXgoaKpYbQ=

middleware/monitoring/sentry.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@
1919
package monitoring
2020

2121
import (
22+
"net/http"
23+
2224
sentryhttp "github.com/getsentry/sentry-go/http"
23-
"github.com/gorilla/mux"
2425
)
2526

26-
func Middleware() mux.MiddlewareFunc {
27+
func Middleware() func(http.Handler) http.Handler {
2728
return sentryhttp.New(sentryhttp.Options{}).Handle
2829
}

server/server.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,17 @@ package main
2121
import (
2222
"context"
2323
"fmt"
24-
"github.com/dapperlabs/flow-playground-api"
24+
"log"
25+
"net/http"
26+
"strings"
27+
"time"
28+
29+
playground "github.com/dapperlabs/flow-playground-api"
2530
"github.com/dapperlabs/flow-playground-api/server/config"
2631
"github.com/dapperlabs/flow-playground-api/server/ping"
2732
"github.com/dapperlabs/flow-playground-api/telemetry"
2833
"github.com/prometheus/client_golang/prometheus/promhttp"
2934
"go.opentelemetry.io/otel/sdk/trace"
30-
"log"
31-
"net/http"
32-
"strings"
33-
"time"
3435

3536
"github.com/go-chi/httplog"
3637

@@ -170,7 +171,6 @@ func main() {
170171

171172
r.Use(httpcontext.Middleware())
172173
r.Use(sessions.Middleware(cookieStore))
173-
r.Use(monitoring.Middleware())
174174

175175
r.Handle(
176176
"/",

0 commit comments

Comments
 (0)