How to Handle 'Referer' Header for TinyMCE in Capacitor/Cordova WebView?

42 Views Asked by At

I am developing a mobile application using Capacitor (or Cordova) with a frontend built using create-react-app. The app integrates TinyMCE (version 6.3.1) from Tiny Cloud for rich text editing. I'm encountering an issue related to domain verification where TinyMCE requires a 'Referer' header, but this header seems absent or incorrectly set in the Capacitor/Cordova WebView environment due to the lack of a traditional web domain.

Environment:

  • Framework: Capacitor/Cordova
  • Frontend: create-react-app
  • TinyMCE Version: 6.3.1
  • Platform: iOS

Issue: A dialog from TinyMCE indicates that the 'Referer' header is missing, leading to domain verification failure. This issue can be reproduced by integrating TinyMCE Cloud in a Capacitor/Cordova environment.

Expected Behavior: The application should integrate TinyMCE without domain verification issues, as traditional web domain concepts do not apply in a Capacitor/Cordova WebView.

Actual Behavior: The 'Referer' header is missing, and TinyMCE fails to verify the domain.

Question: How can I handle or emulate the 'Referer' header in a Capacitor/Cordova WebView?

Are there known workarounds or configurations within these frameworks for integrating web services like TinyMCE Cloud that rely on standard web headers?

I am looking for a solution to ensure that TinyMCE Cloud works seamlessly in a mobile app context, considering the unique environment of Capacitor/Cordova WebViews.

Any insights or code examples would be greatly appreciated!

0

There are 0 best solutions below