Dynamic Rendering service url
In order to support multiple domains/contexts, the repository might be called via different domains.
Hint: This feature is availabe since edu-sharing 6.0.1
In this case, you might want that the rendering service will be fetched via acorresponding sub-domain. (i.e. to prevent 3rd-party cookie blocking or Cross-Origin issues)
For example, if your repo has these domains:
- one.local
- two.local
you should provide sub-domains with the same pattern and assign them to the rendering service:
- rendering.one.local
- rendering.two.local
You need to two configuration steps after setting up your domains:
1. In your edu-sharing repository
Modify the "home-application.properties.xml" / contentUrl and use the placeholder ${context.domain}:
https://rendering.${context.domain}/rendering-service/application/esmain/index.php
this will redirect any requests for rendering to the rendering service using the proper url.
2. In your edu-sharing rendering service
Modify the "system.conf.php" and change $MC_URL setting:
$MC_URL = 'https://'.$_SERVER['HTTP_HOST'].'/rendering-service';
this way, the rendering service will keep the URL provided by the repository request and output the data of this request with all links pointing to the "dynamic" url.