psi-4ward / psitransfer

Simple open source self-hosted file sharing solution.
BSD 2-Clause "Simplified" License
1.48k stars 216 forks source link

Docker or manual deployment behind haproxy? #203

Open DigitalFriends opened 2 years ago

DigitalFriends commented 2 years ago

Hi, trying to get psitransfer to work behind haproxy, everything seems to work except for upload (returns error 500)

tus: unexpected response while creating upload, originated from request (method: POST, url: /files, response code: 500, response text: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Error</title> </head> <body> <pre>Internal Server Error</pre> </body> </html> , request id: n/a)

Is there and docker envs i have to use? If not, should i do a manual deployment?

psi-4ward commented 2 years ago

Probably haproxy doesnt forward all headers like Tus-Resumeable, Upload-Metadata etc?

Compare the header the browser sends with the one which psitransfer receives with tcpdump or dump the heders by inserting console.log(req.headers) in https://github.com/psi-4ward/psitransfer/blob/master/lib/endpoints.js#L296.