mirror of https://github.com/Icinga/icinga2.git
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();
|
||||
|
||||
if (headerAllowOrigin->GetLength() != 0) {
|
||||
if (headerAllowOrigin && headerAllowOrigin->GetLength() != 0) {
|
||||
String origin = m_CurrentRequest.Headers->Get("origin");
|
||||
{
|
||||
ObjectLock olock(headerAllowOrigin);
|
||||
|
|
Loading…
Reference in New Issue