authorizer/server/utils/urls.go
2021-07-15 00:12:18 +05:30

17 lines
227 B
Go

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