ankitpokhrel / tus-php

🚀 A pure PHP server and client for the tus resumable upload protocol v1.0.0

Home Page:https://tus.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Location header set to http when deployed behind reverse proxy

psmirnov-dermview opened this issue · comments

Describe the bug
TUS Server in Laravel listening on http port 80, deployed behind https proxy, e.g. AWS ELB.
Responses sent by TUS Server contain http://..../ which breaks the frontend library, as actual location is https://.../

To Reproduce
Steps to reproduce the behavior:

  1. Deploy behind https enabled proxy
  2. Try uploading files
  3. POST requests will succeed but contain invalid http:// Location, subsequent requests will fail.

Expected behavior
To be compatible with a range of proxy configurations Location header should not really have the $scheme://$host:$port
Instead it should be a relative link unless ApiPath was configured using FQDN.

This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.

Closing because of inactivity.