authorizer/server/utils/urls.go

17 lines
227 B
Go
Raw Normal View History

2021-07-14 18:42:18 +00:00
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()
}