Malformed URL being returned in xmds.php?v=5&method=requiredFiles

On Windows client files are not getting downloaded.
In the debug logs the below error is coming:

FileAgent_media_Id_1|14-06-2019 18:39:15|Info|FileAgent - Run|Web Exception in Run: The remote name could not be resolved: ‘xibodocker200_cms-web_1’

When i check what response the server is sending, it is returning the response as below:

<file type=“media” id=“7” size=“12150” md5=“8d72e0c1775cba38c44bf02aee0c8d83” path=“http://xibodocker200_cms-web_1/xmds.php?file=014845dfc3573fe03961e194ad36f0fc999dc0fbf2d3e0db39e0c34905dea09d&amp;displayId=1&amp;type=M&amp;itemId=7” saveAs=“xibo-text-render.js” download=“http”/>

Resolved now !

This issue was due to incorrect configuration of nginx reverse proxy.

nginx was not forwarding the http_host and scheme(http/https) related headers due to which the CMS server was perceiving the host as xibodocker200_cms-web_1 and scheme as http which led to this malformed/internal URL for file download.

Adding the following settings in nginx revers proxy and a restart after clearing the cache resolved the issue.

    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;