Commit 16ffab8a authored by Sietse Ringers's avatar Sietse Ringers Committed by Ivar Derksen
Browse files

Don't send API token header if it is not set

parent 3553bc49
......@@ -52,7 +52,7 @@ function start_session($type) {
'method' => 'POST',
'header' => "Content-type: application/json\r\n"
. "Content-Length: " . strlen($jsonsr) . "\r\n"
. "Authorization: " . API_TOKEN . "\r\n",
. (!empty(API_TOKEN) ? "Authorization: " . API_TOKEN . "\r\n" : ""),
'content' => $jsonsr
)
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment