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:
@@ -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".
|
||||||
|
|||||||
Reference in New Issue
Block a user