Background:
Our sitecore sites are hosted in Azure Web. We use ARR (Azure Request Routing) to redirect traffic between sitecore site vs. existing legacy site until we fully migrate the legacy pages on to sitecore.
While testing FXM, noticed a weird behavior with how sitecore FXM generates end point for sitecore/api/ssc/Beacon/Service. Instead of generating the public domain it seems to generate azure internal azurewebsite url.
For example, our beacon JS is hosted on https://fxm.poc.com.au/bundle/beacon
However, the response we get from this request has :
SCBeacon = new SCBeacon("//fxm.azurewebsites.net/sitecore/api/ssc/Beacon/Service");
It should be
SCBeacon = new SCBeacon("//fxm.poc.com.au/sitecore/api/ssc/Beacon/Service");
When I look at temp folder on azure, noticed that all the beacon file exept the beacon.js has incorrect URL:
I made sure that
FXM.Hostname is set to fxm.poc.com.au
Still isn't working.
Update:
Looking at BeaconLoadProcessor, the code seems to construct a URL from Context.Request.URL. Which is interesting and unsure how it would work in azure as we don't want to expose origin URL and are IP whitelisted: