]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - api/common_api.php
Add able to change background on overview
[irc/unrealircd/unrealircd-webpanel.git] / api / common_api.php
index ccb1442636ee4423865b82f20bbe67a8015ab7a6..44e9ab9f9e4774c5b0048fd53307e1f3f192ffc8 100644 (file)
@@ -23,6 +23,7 @@ if (str_contains($_SERVER['SERVER_SOFTWARE'], 'Apache') &&
 // Only now make the connection (this can take a short while)
 include "../inc/connection.php";
 
+header("Content-type: application/json; charset=utf-8");
 // Server Side Events
 if (!defined('NO_EVENT_STREAM_HEADER'))
        header('Content-Type: text/event-stream');
@@ -56,7 +57,8 @@ function flush_completely()
        }
 }
 
-flush_completely();
+if (!defined('NO_EVENT_STREAM_HEADER'))
+       flush_completely();
 
 /* Send server-sent events (SSE) message */
 function send_sse($json)