Page 1 of 1
HTTPS problem on DELETE files
Posted: Mon Jan 16, 2017 6:32 pm
by alliance8791
Hi all. I have this configuration:
Apache web server with HTTPS listening on port 5556 "h_t_t_p_s://mywebsite.xxx:5556/"
Everything works very well, but when i try to delete some files that i have uploaded, nothing happens and from the Chrome console i see this error:
Mixed Content: The page at *'h_t_t_p_s://xxxxxxxxxx:5556/tutoreedit.php?showdetail=&idtutore=1' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'h_t_t_p://xxxxxxxxxx:5556/ewupload13.php?rnd=1474829508&id=x_LinkDocumenti&table=tutore&x_LinkDocumenti=xxxxxxxxxxxxxx.pdf&method=DELETE'. This request has been blocked; the content must be served over HTTPS.
XMLHttpRequest cannot load "h_t_t_p://xxxxxxxxxx:5556/ewupload13.php?rnd=1474829508&id=x_LinkDocumenti&table=tutore&x_LinkDocumenti=xxxxxxxxxxxxxx.pdf&method=DELETE". Failed to start loading.
Why the requests to delete are not in HTTPS too ????
Tnx in advance
Re: HTTPS problem on DELETE files
Posted: Tue Jan 17, 2017 4:14 pm
by mobhar
How did you delete the files? Did you use your own specific link or delete the files from Edit form?
Re: HTTPS problem on DELETE files
Posted: Tue Jan 17, 2017 6:38 pm
by alliance8791
mobhar wrote:
How did you delete the files? Did you use your own specific link or delete the files
from Edit form?
Hi mobhar, normal delete from edit form. Tnx
Re: HTTPS problem on DELETE files
Posted: Wed Jan 18, 2017 3:21 pm
by Webmaster
The generated codes should be able to detect https. Please add the following codes to the Page_Load server event. Show what you get.
echo "full url: " . ew_FullUrl() . "<br>";
Re: HTTPS problem on DELETE files
Posted: Thu Jan 19, 2017 4:12 pm
by alliance8791
Hi, this is the real page i am browsing: h_t_t_p_s://xxxxxx.noip.me:5556/login.php and this is what echo "full url: " . ew_FullUrl() . "<br>"; is showing:
full url: h_t_t_p://xxxxxxx.noip.me:5556/login.php
Tnx in advance.
Re: HTTPS problem on DELETE files
Posted: Thu Jan 19, 2017 4:20 pm
by Webmaster
Upload a test script to your server and run phpinfo() (see http://php.net/manual/en/function.phpinfo.php), find $SERVER['HTTPS'] and $SERVER['SERVER_PORT'], what are the values?
Re: HTTPS problem on DELETE files
Posted: Thu Jan 19, 2017 4:39 pm
by alliance8791
This is the only thing i found:
_SERVER["HTTP_X_FORWARDED_PROTO"] https
_SERVER["HTTP_X_FORWARDED_PORT"] 5556
Tnx.
Re: HTTPS problem on DELETE files
Posted: Thu Jan 19, 2017 5:04 pm
by Webmaster
Missing $SERVER['HTTPS'] and therefore HTTPS cannot be detected. For the time being you need to customize ew_IsHttps() in the template to suit your server, e.g. check $SERVER["HTTP_X_FORWARDED_PROTO"].
Re: HTTPS problem on DELETE files
Posted: Thu Jan 19, 2017 9:57 pm
by alliance8791
I changed the weberver from APACHE 2.4 to APACHE 2.2 and everything now is working perfectly.
Problem was APACHE 2.4.
Ciao.