Running Xperience behind a proxy server
If you wish to host Xperience behind a proxy server or some other service that masks the application's original domain (e.g., Azure Application Gateway), you need to ensure request URLs from all parts of the application are generated correctly (targeting the proxy domain). Otherwise, you may encounter issues with Cross-Origin Resource Sharing (CORS) policies when performing certain actions (such as uploading images to Media libraries).
Configuring Xperience running behind a proxy server
To correctly configure Xperience running behind a proxy service, you need to:
- Set the CMSUrlHost configuration key for the live site application
- Configure the MVC site's Presentation URL property
Setting the CMSUrlHost configuration key
On the live site, set the CMSUrlHost configuration key to the host component of the proxy server's URL (omitting the port number).
- Edit your live site project's web.config file.
Add the CMSUrlHost key into the <appSettings> section of the file. Set the key's value to the host component of the proxy server's URL (omitting the port number).
- For example, assuming the site is running behind the https://my.proxyserver.com proxy server, set the key to my.proxyserver.com:
<add key="CMSUrlHost" value="my.proxyserver.com" />
- Save the file.
Setting the MVC site's Presentation URL property
Configure the Presentation URL property (via the Sites application) of the front-end MVC site to target the proxy server's domain:
- Open the Xperience administration interface in your browser.
- Navigate to the Sites application and edit the MVC site.
- Set the Presentation URL property to the full domain name of the proxy server.
- For example, assuming the site is running behind the https://my.proxyserver.com proxy server, set Presentation URL to https://my.proxyserver.com.
- For example, assuming the site is running behind the https://my.proxyserver.com proxy server, set Presentation URL to https://my.proxyserver.com.
- Save the changes.
The system is now configured to generate URLs targetting the specified proxy server.
Was this page helpful?