fix: handle signup token
This commit is contained in:
@@ -2,6 +2,7 @@ package handlers
|
||||
|
||||
import (
|
||||
"github.com/99designs/gqlgen/graphql/handler"
|
||||
"github.com/authorizerdev/authorizer/server/constants"
|
||||
"github.com/authorizerdev/authorizer/server/graph"
|
||||
"github.com/authorizerdev/authorizer/server/graph/generated"
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -14,6 +15,9 @@ func GraphqlHandler() gin.HandlerFunc {
|
||||
h := handler.NewDefaultServer(generated.NewExecutableSchema(generated.Config{Resolvers: &graph.Resolver{}}))
|
||||
|
||||
return func(c *gin.Context) {
|
||||
if constants.AUTHORIZER_DOMAIN == "" {
|
||||
constants.AUTHORIZER_DOMAIN = "https://" + c.Request.Host
|
||||
}
|
||||
h.ServeHTTP(c.Writer, c.Request)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user