Got a main app running on port 3002 and a second one running on port 3000. When using the main app from a browser (tested Chrome, Firefox, Safari), everything works just fine, including mounting the second app in an iframe.
The problem I'm having is when I jump to debug the mobile version on my iPhone's Safari, the main app is failing to load the support app with error message 'Failed to load resource: Could not connect to the server.'
Both apps are Rails applications, with the secondary app running on a WEBrick HTTP Server. On the secondary app I added the following lines in application.rb to for CORS support, with no success:
config.action_dispatch.default_headers.merge!({
'Access-Control-Allow-Origin' => '*',
'Access-Control-Request-Method' => '*'
})
Another piece of the puzzle: when I switch the secondary app URL to the production one deployed in Heroku, the main app successfully loads it in the iFrame. So--issue is only happening when the secondary app is running locally.
Appreciate any pointers in advance.