Summary
After installing the local Survey123 installer on-premises, follow these steps to enable surveys published from the local installer to be embedded in other applications, such as Experience Builder and Workflow Manager, from different domains.
Procedure
- Stop the Survey123 Service
- Access the machine where the local Survey123 installer is installed.
- Stop the Survey123 service from the operating system level to ensure that changes can be made safely.
- Locate the Configuration File
- Navigate to the directory where the Survey123 installer is installed.
- Locate the config.json file, which is typically found in the installation folder. The Linux installation folder is ~\ArcGIS\Survey123website and the default location on Windows is C:\Program Files\ArcGIS\Survey123website.
- Modify the config.json File
- Open the config.json file in a text editor.
- Add the following content at the root level of the config.json file to adjust the content security policy. This allows embedding of the Survey123 web app:
"securityHeader": {
"contentSecurityPolicy": {
"directives": {
"frameAncestors": [
"'self'", //this value allows survey123 webapp to be embedded within the same domain even the port is different
"*. Esri.com" //add domain info where other apps are installed
]
}
}
}
- Start the Survey123 Service
- Save the changes to the config.json file.
- Restart the Survey123 service at the operating system level to apply the new configuration.
This resolves the following or similar bugs:
- BUG-000161914 The default configuration of the installed ArcGIS Survey123 website returns an X-Frame-Options error preventing published surveys to be embedded in the Survey widget in ArcGIS Experience Builder developer edition.