From e3a64893f66e13929df3c345105e8f07fa127d1c Mon Sep 17 00:00:00 2001 From: Stefano Cappa Date: Tue, 20 Aug 2024 16:55:28 +0200 Subject: [PATCH] fix: remove trailing / in github oauth2 callback url Signed-off-by: Stefano Cappa --- initialization/server.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/initialization/server.go b/initialization/server.go index 08df8e0..d62540c 100644 --- a/initialization/server.go +++ b/initialization/server.go @@ -9,7 +9,6 @@ import ( limits "github.com/gin-contrib/size" "github.com/gin-gonic/contrib/gzip" "github.com/gin-gonic/gin" - "github.com/go-playground/validator/v10" "go.mongodb.org/mongo-driver/mongo" "go.uber.org/zap" "golang.org/x/net/context" @@ -34,7 +33,7 @@ var oauthScopes = []string{"repo"} //https://developer.github.com/v3/oauth/#scop // SetupRouter function func SetupRouter(httpOrigin string, logger *zap.SugaredLogger) (*gin.Engine, cookie.Store) { // init oauthCallbackURL based on httpOrigin - oauthCallbackURL = httpOrigin + "/api/callback/" + oauthCallbackURL = httpOrigin + "/api/callback" // init GIN router := gin.Default()