From d4d5d371ac18b787aef08927b7c039cc7ab42d28 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Sat, 22 Aug 2015 16:51:56 -0700 Subject: [PATCH] Use POST heartbeat route instead of GET --- src/cloudron.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cloudron.js b/src/cloudron.js index 9da9b8d25..a76d45a38 100644 --- a/src/cloudron.js +++ b/src/cloudron.js @@ -271,8 +271,7 @@ function getConfig(callback) { function sendHeartbeat() { var url = config.apiServerOrigin() + '/api/v1/boxes/' + config.fqdn() + '/heartbeat'; - // TODO: this must be a POST - superagent.get(url).query({ token: config.token(), version: config.version() }).timeout(10000).end(function (error, result) { + superagent.post(url).query({ token: config.token(), version: config.version() }).timeout(10000).end(function (error, result) { if (error) debug('Error sending heartbeat.', error); else if (result.statusCode !== 200) debug('Server responded to heartbeat with %s %s', result.statusCode, result.text); else debug('Heartbeat sent to %s', url);