Unable to run behind a reverse proxy
See original GitHub issueI’m trying to run, without success, the tus server as an express middleware, behind a reverse proxy hosted in a URL other than “/”.
On the server side:
const tusServer = new tus.Server();
tusServer.datastore = new tus.FileStore({
path: "/files"
});
const uploadApp = express();
uploadApp.all("*", tusServer.handle.bind(tusServer));
app.use("/uploads", uploadApp);
When I start an upload on the browser, it correctly creates it, but notice how /uploads
has a prefix path. The server responds with an incorrect location
, and the following PATCH request don’t work well:
Going through the closed issues, I saw a fix mentioning an undocumented property relativeLocation
, so I tried to set that to true:
File creation still works and now it only returns the filename, but then the PATCH request fails, which although now includes the correct path prefix, I think it might be missing the “files/” part of it.
Am I doing anything wrong or missing something? thanks for the help.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Just use relative location and should work with uppy.
This still needs changes.