[GH-ISSUE #1057] Upload error behind a reverse proxy #678

Open
opened 2026-03-02 16:00:45 +03:00 by kerem · 0 comments
Owner

Originally created by @Axolito on GitHub (Jun 19, 2023).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/1057

I am getting this JS error:
Server responded with 0 code

I found part of the solution here #229

I run Tinyfilemanager behind an Apache reverse proxy that handles HTTPS SSL.
Here is its configuration:

ProxyPreserveHost on
ProxyPass / http://10.19.0.35/
ProxyPassReverse / http://10.19.0.35/

Unfortunately, Tinyfilemanager does not recognize the HTTPS proxy header for file uploads.
The temporary solution I've used while waiting for this to be fixed is to replace :

$is_https = isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1)
    || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https';

by :
$is_https = true;

Originally created by @Axolito on GitHub (Jun 19, 2023). Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/1057 I am getting this JS error: `Server responded with 0 code` I found part of the solution here #229 I run Tinyfilemanager behind an Apache reverse proxy that handles HTTPS SSL. Here is its configuration: ``` ProxyPreserveHost on ProxyPass / http://10.19.0.35/ ProxyPassReverse / http://10.19.0.35/ ``` Unfortunately, Tinyfilemanager does not recognize the HTTPS proxy header for file uploads. The temporary solution I've used while waiting for this to be fixed is to replace : ``` $is_https = isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1) || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'; ``` by : `$is_https = true;`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tinyfilemanager#678
No description provided.