A few more details:
In the JS-client script:
uppy.use(Uppy.Tus, { endpoint: 'https://cuahsi-dev-1.hydroshare.org/upload/' });
...
uppy.use(Uppy.GoogleDrive, {
target: Uppy.Dashboard,
companionUrl: 'https://cuahsi-dev-1.hydroshare.org/companion/'
});
In NGINX.conf:
location /upload/ {
# doesn't work for some reason involving docker networking setup:
proxy_pass http://tusd:1080;
...
}
location /companion/ {
proxy_pass http://uppy:3020/;
...
}
The symbols tusd and uppy are defined in /etc/hosts.
In starting up tusd,
/usr/local/bin/tusd -base-path /upload/ -behind-proxy
What I think I’m doing is to expose tusd as https://cuahsi-dev-1.hydroshare.org/upload and companion as https://cuahsi-dev-1.hydroshare.org/companion.
The problem is that – according to the JavaScript debugging console, the tusd URL that is given to companion is the same external one that is declared to the js-client. Since companion is running behind a proxy, it can’t contact tusd that way.
I think the way I have to fix this is to make it possible for companion to contact `tusd’ via the public URL even though it is behind the proxy. Is this correct?