mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-27 22:53:29 +00:00
01_FHEMWEB.pm: add csrfToken to the HTTP header (Forum #66484)
git-svn-id: https://svn.fhem.de/fhem/trunk@13348 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
851edb032b
commit
dbcf17b663
@ -412,6 +412,8 @@ FW_Read($$)
|
||||
"Access-Control-Allow-Headers: Origin, Authorization, Accept\r\n".
|
||||
"Access-Control-Allow-Credentials: true\r\n".
|
||||
"Access-Control-Max-Age:86400\r\n" : "");
|
||||
$FW_headerlines .= "X-FHEM-csrfToken: $defs{$FW_wname}{CSRFTOKEN}\r\n"
|
||||
if($defs{$FW_wname}{CSRFTOKEN});
|
||||
|
||||
#########################
|
||||
# Return 200 for OPTIONS or 405 for unsupported method
|
||||
|
Loading…
x
Reference in New Issue
Block a user