authorizer/server/utils/urls.go

20 lines
284 B
Go
Raw Normal View History

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