Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix session bug caused by [email protected] #347

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ require (
github.com/go-chi/httplog v0.2.5
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
github.com/google/uuid v1.3.1
github.com/gorilla/mux v1.8.1
github.com/gorilla/sessions v1.2.0
github.com/gorilla/websocket v1.5.0
github.com/icza/bitio v1.1.0
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,6 @@ github.com/googleapis/gax-go/v2 v2.11.0 h1:9V9PWXEsWnPpQhu/PeQIkS4eGzMlTLGgt80cU
github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI=
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ=
github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
github.com/gorilla/sessions v1.2.0 h1:S7P+1Hm5V/AT9cjEcUD5uDaQSX0OE577aCXgoaKpYbQ=
Expand Down
5 changes: 3 additions & 2 deletions middleware/monitoring/sentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
package monitoring

import (
"net/http"

sentryhttp "github.com/getsentry/sentry-go/http"
"github.com/gorilla/mux"
)

func Middleware() mux.MiddlewareFunc {
func Middleware() func(http.Handler) http.Handler {
return sentryhttp.New(sentryhttp.Options{}).Handle
}
12 changes: 6 additions & 6 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@ package main
import (
"context"
"fmt"
"github.com/dapperlabs/flow-playground-api"
"log"
"net/http"
"strings"
"time"

playground "github.com/dapperlabs/flow-playground-api"
"github.com/dapperlabs/flow-playground-api/server/config"
"github.com/dapperlabs/flow-playground-api/server/ping"
"github.com/dapperlabs/flow-playground-api/telemetry"
"github.com/prometheus/client_golang/prometheus/promhttp"
"go.opentelemetry.io/otel/sdk/trace"
"log"
"net/http"
"strings"
"time"

"github.com/go-chi/httplog"

Expand Down Expand Up @@ -170,7 +171,6 @@ func main() {

r.Use(httpcontext.Middleware())
r.Use(sessions.Middleware(cookieStore))
r.Use(monitoring.Middleware())
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


r.Handle(
"/",
Expand Down
Loading