apns2
apns2 copied to clipboard
APNs urls should be in a config file
Hi, I think you should consider getting the push urls from a config file, and it should be optional for the consumer to change it when calling apns2 api;
// Apple HTTP/2 Development & Production urls
const (
HostDevelopment = "https://api.sandbox.push.apple.com"
HostProduction = "https://api.push.apple.com"
)
Hi @keremoge
You can already override the URL's if needed
The first way is to set the default host before you init a client:
apns2.DefaultHost = "api.mycustomdomain.com"
Alternatively, set the host after you have called NewClient / NewTokenClient:
client := apns2.NewTokenClient(token)
client.Host = "api.mycustomdomain.com"
Hope that helps