Kitura / Kitura/CloudEnvironment

Hardcoded "Bluemix" URLs

Open
#58 0 comments 0 reactions 1 assignee Claimed by @adam-rocska View on GitHub
Dominant language
Swift
Stars
14
Forks
16
PR merge metrics
No merged PRs in 30d

Description

In some places, `bluemix.net` is hardcoded. At the minimum, this must be upgraded to `cloud.ibm.com`, if not removed entirely.

`PushSDKCredentials.swift` - CloudEnvironment can be used on other cloud providers (esp given OpenShift will be coming…) but in this code I see “bluemix.net” hardcoded - is that supposed to be there?

```private func getRegion(from url: URL) -> String? {
guard let host = url.host,
host.hasSuffix(“.bluemix.net”)
else{
return nil
}
let parts = host.split(separator: “.”).suffix(3)
guard parts.count > 2 && parts.first != “imfpush” else {
return nil
}
return parts.joined(separator: “.”)
}```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.