mirror of
https://github.com/webmin/webmin.git
synced 2025-07-21 23:40:34 +00:00
Log SSL redirects
This commit is contained in:
@ -1409,6 +1409,7 @@ elsif ($reqline !~ /^(\S+)\s+(.*)\s+HTTP\/1\..$/) {
|
|||||||
local $jsredir = $config{'musthost'} ?
|
local $jsredir = $config{'musthost'} ?
|
||||||
"location.href='$url'" :
|
"location.href='$url'" :
|
||||||
"location.protocol='https:'";
|
"location.protocol='https:'";
|
||||||
|
$reqline = "GET / HTTP/1.1"; # Fake it for the log
|
||||||
&http_error(200, "Document follows",
|
&http_error(200, "Document follows",
|
||||||
"This web server is running in SSL mode. ".
|
"This web server is running in SSL mode. ".
|
||||||
"Trying to redirect to <a href='$url'>$url</a> instead ...".
|
"Trying to redirect to <a href='$url'>$url</a> instead ...".
|
||||||
@ -1456,6 +1457,7 @@ elsif ($reqline !~ /^(\S+)\s+(.*)\s+HTTP\/1\..$/) {
|
|||||||
local $url = $config{'musthost'} ?
|
local $url = $config{'musthost'} ?
|
||||||
"https://$config{'musthost'}:$port/" :
|
"https://$config{'musthost'}:$port/" :
|
||||||
"https://$host:$port/";
|
"https://$host:$port/";
|
||||||
|
$reqline = "GET / HTTP/1.1"; # Fake it for the log
|
||||||
&http_error(200, "Bad Request", "This web server is not running in SSL mode. Try the URL <a href='$url'>$url</a> instead.", 0, 1);
|
&http_error(200, "Bad Request", "This web server is not running in SSL mode. Try the URL <a href='$url'>$url</a> instead.", 0, 1);
|
||||||
EOF
|
EOF
|
||||||
if ($@) {
|
if ($@) {
|
||||||
@ -5706,6 +5708,9 @@ if (@protos) {
|
|||||||
}
|
}
|
||||||
&write_data("\r\n");
|
&write_data("\r\n");
|
||||||
|
|
||||||
|
# Log now
|
||||||
|
&log_request($loghost, $authuser, $reqline, "101", 0);
|
||||||
|
|
||||||
# Start forwarding data
|
# Start forwarding data
|
||||||
print DEBUG "in websockets loop\n";
|
print DEBUG "in websockets loop\n";
|
||||||
while(1) {
|
while(1) {
|
||||||
|
Reference in New Issue
Block a user