Hi.
Im currently configuring an API url for my mobile application. As for debug purposes, the API URL is in IP address form bind with custom port (eg: 123.123.123.123:5564). SSL configuration was done using self signed cert only. The request includes a user define file that acts as header alongside with json application type and it must be included to obtain result.
My curl config:
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'api_header : '.$apifile,
‘Accept: application/json’,
‘Content-Type: application/json’
));
In order to protect my origin IP address from getting leaked publicly, I have decided to implement Cloudflare Proxy to the IP address. Using my working domain, i have added a subdomain to be pointed out to the origin IP of my API.
And of course i had to change the custom port 5564 bonded with localhost and create another proxy to bind to Cloudflare Proxy HTTPS port (eg: 8443) to 127.0.0.1:5564
lets say:
Public API URL = https://123.123.123.123:8443
Origin API URL = https://127.0.0.1:5564
So after implementing Cloudflare Proxy to my API URL, i got an error api_header was not found or included with the request even though i have included it.
Kindly seek for an assistance on this matter.