diff --git a/README.md b/README.md index 5fc1aff..d3a7dee 100644 --- a/README.md +++ b/README.md @@ -40,9 +40,100 @@ A sample of the web viewer content that must be provided on each layout: ``` -## FileMaker Server Configuration +## FileMaker Server Configuration for basic support -1. Enable Home URL Support -2. Add `https://webdlanding.wizardsoftware.net` as an allowed home url -3. Restart FileMaker Services -4. Add postMessage forwarding script as referenced in https://github.com/WizardSoftware/WebDLanding/issues/6 +Update web.config in the http server directory + +```xml + +``` + +This allows WebDLanding to iframe in the content of the web direct session. + +## FileMaker Server Configuration For Back Button Support + +Support for the back button requires some further configuration on the FileMaker Server. + +### Enable Home URL Support + +Update the `jwpc_prefs.xml` file located in the `/Web Publishing/conf/jwpc_prefs.xml` + +```xml +yes +``` + +### Add `https://webdlanding.wizardsoftware.net` as an allowed home url + +Update the `jwpc_prefs.xml` file located in the `/Web Publishing/conf/jwpc_prefs.xml` + +```xml +https://webdlanding.wizardsoftware.net +``` + +### Restart FileMaker Services + +🪟➕R => services.msc => FileMaker Server => Restart + +### Add postMessage forwarding script as referenced in https://github.com/WizardSoftware/WebDLanding/issues/6 + +Add the following snipet as a file named `message-forward.js` to FMServer Root Site `/HTTPServer/conf`: + +```js +window.addEventListener("message", d => { + // find all frames inside the webdirect session + let frames = Array.from(document.getElementsByTagName("iframe")); + if (frames.length) { + // fore each frame found, relay the event by re-posting it down to the child frame + frames.forEach(frame => { + frame.contentWindow.postMessage(d.data, "*") + }); + } +}); +``` + +#### Web.Config Mods + +Rewrite Section + +Add two new Outbound Rules + +```xml + + + + + + + + +``` + +Add two PreConditions + +```xml + + + + + + + + +``` + +Update the existing inbound rule: `FMWebPublishing` adding two http server variables: + +```xml + + +``` + +Add both of the above variables to the allowed variables list: + +```xml + + + + + +``` \ No newline at end of file