ExpediaGroup / cyclotron

A web platform for constructing dashboards.
https://www.cyclotron.io/
MIT License
1.56k stars 113 forks source link

Excel / PDF export is using local ip address not domain address #43

Closed kedwards closed 5 years ago

kedwards commented 5 years ago

When trying to export reports, cyclotron is providing the correct path to the file location for download but has the improper ip address / domain.

the address given by cyclotron is:

http://10.0.1.208:8077/exports/personnel_data-l1iKoujhzI.xlsx

the domain address it should be returning is something like:

http://my.domain.com:8077/exports/personnel_data-l1iKoujhzI.xlsx

Is this configurable?

baumandm commented 5 years ago

Good catch, unfortunately this is hardcoded here: https://github.com/ExpediaInceCommercePlatform/cyclotron/blob/master/cyclotron-svc/routes/api.exports.js#L265

        url: 'http://' + ip.address() + ':' + config.port + '/exports/' + key

Adding a new configuration to replace the hardcoded URLs would be pretty straightforward if you want to create a PR for this.

kedwards commented 5 years ago

Thanks PR done, test show download links are now available! cheers!

baumandm commented 5 years ago

Thanks, merged!