authorizer/server/utils/urls.go
2021-07-21 21:27:12 +05:30

20 lines
284 B
Go

package utils
import (
"log"
"net/url"
"github.com/yauthdev/yauth/server/constants"
)
func GetFrontendHost() string {
u, err := url.Parse(constants.FRONTEND_URL)
if err != nil {
return `localhost`
}
log.Println("hostname", "."+u.Hostname())
return "." + u.Hostname()
}