2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-20 07:16:03 +00:00

01_FHEMWEB: return a minimal robots.txt

git-svn-id: https://svn.fhem.de/fhem/trunk@13423 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2017-02-16 21:14:02 +00:00
parent dba4e2950d
commit 7a2fea58a5

View File

@ -726,7 +726,14 @@ FW_answerCall($)
my ($dir1, $dirN, $ofile) = ($1, $2, $3)
if($arg =~ m,^$FW_ME/([^/]*)(.*/)([^/]*)$,);
if($arg =~ m,^$FW_ME/icons/(.*)$,) {
if($arg =~ m,\brobots.txt$,) {
Log3 $FW_wname, 1, "NOTE: $FW_wname is probed by a search engine";
$FW_RETTYPE = "text/plain; charset=$FW_encoding";
FW_pO "User-agent: *\r";
FW_pO "Disallow: *\r";
return 0;
} elsif($arg =~ m,^$FW_ME/icons/(.*)$,) {
my ($icon,$cacheable) = (urlDecode($1), 1);
my $iconPath = FW_iconPath($icon);