Revert "Merge branch 'main' of https://github.com/manojown/authorizer into feat/couchbase-db-support"

This reverts commit 2052b850a3, reversing
changes made to fe862a50e5.
This commit is contained in:
manoj
2022-12-29 20:14:06 +05:30
parent 2052b850a3
commit 303c59ac91
45 changed files with 2439 additions and 2002 deletions

View File

@@ -20,12 +20,12 @@ func GetHost(c *gin.Context) string {
authorizerURL = ""
}
if authorizerURL != "" {
return strings.TrimSuffix(authorizerURL, "/")
return authorizerURL
}
authorizerURL = c.Request.Header.Get("X-Authorizer-URL")
if authorizerURL != "" {
return strings.TrimSuffix(authorizerURL, "/")
return authorizerURL
}
scheme := c.Request.Header.Get("X-Forwarded-Proto")
@@ -33,7 +33,7 @@ func GetHost(c *gin.Context) string {
scheme = "http"
}
host := c.Request.Host
return strings.TrimSuffix(scheme+"://"+host, "/")
return scheme + "://" + host
}
// GetHostName function returns hostname and port
@@ -91,7 +91,7 @@ func GetDomainName(uri string) string {
return host
}
// GetAppURL to get /app url if not configured by user
// GetAppURL to get /app/ url if not configured by user
func GetAppURL(gc *gin.Context) string {
envAppURL, err := memorystore.Provider.GetStringStoreEnvVariable(constants.EnvKeyAppURL)
if envAppURL == "" || err != nil {