mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-26 07:04:37 +02:00
Merge pull request #6174 from Icinga/fix/api-crash-no-headeralloworigin
Fix crash without CORS setting
This commit is contained in:
commit
0d3a04cf92
@ -214,7 +214,7 @@ bool HttpServerConnection::ManageHeaders(HttpResponse& response)
|
|||||||
|
|
||||||
Array::Ptr headerAllowOrigin = listener->GetAccessControlAllowOrigin();
|
Array::Ptr headerAllowOrigin = listener->GetAccessControlAllowOrigin();
|
||||||
|
|
||||||
if (headerAllowOrigin->GetLength() != 0) {
|
if (headerAllowOrigin && headerAllowOrigin->GetLength() != 0) {
|
||||||
String origin = m_CurrentRequest.Headers->Get("origin");
|
String origin = m_CurrentRequest.Headers->Get("origin");
|
||||||
{
|
{
|
||||||
ObjectLock olock(headerAllowOrigin);
|
ObjectLock olock(headerAllowOrigin);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user