question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to run behind a reverse proxy

See original GitHub issue

I’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:

image

Going through the closed issues, I saw a fix mentioning an undocumented property relativeLocation, so I tried to set that to true:

image

image

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:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
mitjapcommented, May 27, 2021

Just use relative location and should work with uppy.

0reactions
mitjapcommented, Jan 27, 2022

This still needs changes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to Access WebLogic Console Behind a Reverse Proxy ...
1.4.0 are run on the same system, and WebLogic is run behind a reverse proxy on Linux. The console login works only with...
Read more >
unable to host rancher behind a reverse proxy #719 - GitHub
Able to bring up a rancher-server with SSL behind Nginx as https reverse proxy. Following are the steps followed: docker run -d --restart=always...
Read more >
How To Set Up a Reverse Proxy (Step-By-Step for Nginx ...
Comprehensive Reverse Proxy guide for WordPress. Learn how to load a different WordPress site from a subdirectory via reverse proxy.
Read more >
Running Behind a Reverse Proxy - Sonatype Help
Reverse Proxy Virtual Host at Base Path ... Scenario: You need to expose the repository manager using a custom host name of repo.example.com...
Read more >
GitLab behind Reverse Proxy does not work
With reverse proxy https is behind, the user's connection box is displayed but when an user tries to connect, it happens 404 gitlab...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found