01_FHEMWEB.pm: CORS Origin is case insensitive (Forum #64219)

git-svn-id: https://svn.fhem.de/fhem/trunk@12984 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2017-01-06 13:58:42 +00:00
parent 8118a24810
commit 0b3bcb1845

View File

@@ -408,7 +408,7 @@ FW_Read($$)
} @FW_httpheader; } @FW_httpheader;
delete($hash->{HDR}); delete($hash->{HDR});
my @origin = grep /Origin/, @FW_httpheader; my @origin = grep /Origin/i, @FW_httpheader;
$FW_headerlines = (AttrVal($FW_wname, "CORS", 0) ? $FW_headerlines = (AttrVal($FW_wname, "CORS", 0) ?
(($#origin<0) ? "": "Access-Control-Allow-".$origin[0]."\r\n"). (($#origin<0) ? "": "Access-Control-Allow-".$origin[0]."\r\n").
"Access-Control-Allow-Methods: GET OPTIONS\r\n". "Access-Control-Allow-Methods: GET OPTIONS\r\n".