Custom base url support added
This is a feature request to allow developers to opt in to use a proxy server as OneSignal api base url. It happen that OneSignal domains are blocked in some countries and by some ISPs… so I think this could be a good way to allow devs to use OneSignal.
@luis901101 Thanks for the PR, you noted "OneSignal domains are blocked in some countries and by some ISPs ...". Could you let us know which ones? We would like to solve the issue by trying to reach out to them to unblock onesignal.com. As requiring work arounds such as setup up a proxy isn't ideal.
@jkasten2 thanks for your answer. Currently I just can experienced this blocking issue from Cuba where I live, but I have found similar issues int he past like these ones: https://github.com/OneSignal/OneSignal-iOS-SDK/issues/554 https://github.com/OneSignal/OneSignal-Android-SDK/issues/855
I understand there are legal implications in this matter as commented here: https://wordpress.org/support/topic/country-or-region-ip-banned/
But there is something I can’t understand, for instance in my particular case “Cuba”, the only thing is blocked is the subscription to OneSignal I mean any api request will get a 403 error, nevertheless if I use a VPN only for the subscription request then I turn off the VPN and after that I receive push notifications normally for Android as well as iOS. This means the push notification service from Google Firebase and Apple are not blocked for Cuba, so why not to allow devs to use a custom base url as reverse proxy?
@luis901101 Thanks for the PR, you noted "OneSignal domains are blocked in some countries and by some ISPs ...". Could you let us know which ones? We would like to solve the issue by trying to reach out to them to unblock onesignal.com. As requiring work arounds such as setup up a proxy isn't ideal.
The request is not unblock your domain, this is a problem of your ISP, the request is only add a customURL support that the SDK will contact vs the direct domain to allow to use proxies.
There currently isn't a plan to support this feature in the SDK itself. Please contact OneSignal support if this still a feature you require.