postMessage() in iframe fails because document.referrer returns empty string in iOS

I’m having a problem where a vendor’s javascript is throwing an error because document.referrer returns an empty string as a parameter being sent to postMessage().

Here’s the error I’m seeing.

I’ve read several things, perhaps Webkit is stripping the hostname for security reasons or there’s an HTTP header that’s stripping that referrer out (I haven’t found any of these headers). Or it has something to do with WKWebKit and having to use the ionic:// to serve local files. Just overall, not sure how to resolve this issue.

Any insights would be highly appreciated.

Here’s my $ ionic info:

Ionic:

   Ionic CLI         : 5.4.16
   Ionic Framework   : ionic1 1.0.0-beta.14
   @ionic/v1-toolkit : 2.0.11

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.1.0, ios 5.1.1
   Cordova Plugins   : cordova-plugin-ionic 5.4.4, cordova-plugin-ionic-webview 4.1.2, (and 17 other plugins)

Utility:

   cordova-res (update available: 0.14.0) : 0.9.0
   native-run (update available: 1.0.0)   : 0.3.0

System:

   Android SDK Tools : 26.1.1 (~/Library/Android/sdk)
   ios-deploy        : 1.10.0
   ios-sim           : 8.0.2
   NodeJS            : v8.16.0 (~/.nvm/versions/node/v8.16.0/bin/node)
   npm               : 6.4.1
   OS                : macOS Catalina
   Xcode             : Xcode 11.4.1 Build version 11E503a