INNER CODE UNIT · Go
buildCustomerURL
alexellis/derek · auth/customers.go:19
func buildCustomerURL() string {
if customURL, exists := os.LookupEnv(customersURLEnv); exists && (len(customURL) > 0) {
if !strings.HasPrefix(strings.ToLower(customURL), "http") {
customURL = fmt.Sprintf("https://%s", customURL)
}
return customURL
}
return defaultCustomersURL
}
// IsCustomer returns true if a customer is listed in the customers file.
// The validation is controlled by the 'validate_customers' env-var
func IsCustomer(ownerLogin string, c *http.Client) (bool, error) {
validate := customerValidationEnabled()
if !validate {