Closed tribor closed 1 year ago
Better to insert the line define("MTT_USE_HTTPS", true);
into config.php in the root.
In case of init.php you have to edit the file after every version update.
Well, my proposed workaround does not fix the issue. Any plans on working on the X-Forwarded-Proto headers? Or did I get it wrong and the environment variable MTT_USE_HTTPS does work somehow?
Did you try v1.7.3?
Without define("MTT_USE_HTTPS", true);
?
I just tried it with version v1.7.3. The bug is still present. Same error message
Some error occurred (click for details) Bad connection
Please look at page sources for javascript function $().ready(function()
.
There should be a line with backend url, looking like "mttUrl": "https://mytinytodo.net/demo/",
.
Does it have any differences compared to the url of page you open in browser?
my browser is blocking the API-request:
Could you please edit the file init.php
in the script root folder.
On the line 345 (as of v1.7.3) change this code:
$_mttinfo['mtt_url'] = url_dir( get_unsafe_mttinfo('url'), 0 );
to this one:
$_mttinfo['mtt_url'] = url_dir( get_unsafe_mttinfo('url'), 1 );
i.e. replace 0 to 1 in the end.
And check.
BTW, you should use MTT_USE_HTTPS as constant, not environment variable,
i.e. set in config define("MTT_USE_HTTPS", true);
Pay attention to set to true
or 1
. In the case of "yes"
, will not work.
Could you please edit the file
init.php
in the script root folder. On the line 345 (as of v1.7.3) change this code:$_mttinfo['mtt_url'] = url_dir( get_unsafe_mttinfo('url'), 0 );
to this one:
$_mttinfo['mtt_url'] = url_dir( get_unsafe_mttinfo('url'), 1 );
i.e. replace 0 to 1 in the end.
And check.
I can confirm that this is working now :-)
Version: 1.7.2
I get an error when running on https:
It seems that the environment var MTT_USE_HTTPS does not change this behavior when set.
Workaround: insert on the first lines of the file init.php:
define("MTT_USE_HTTPS","yes");
Fix:
TODO: Check for X-Forwarded-Proto==https or X-Forwarded-For==https ?