Skip to content

Commit

Permalink
add fakeHFTSitePing to shut up hftsite code
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Feb 12, 2016
1 parent 972080a commit 01876f7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions server/hft-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -707,10 +707,20 @@ var HFTServer = function(options, startedCallback) {
});
};

// if we're in DNS mode we'll get messages from games trying to
// inform happyfuntimes.net
function fakeHFTSitePing(req, res) {
res.json({
ip: "0.0.0.0",
});
}

app.get(/^\/games\/(.*?)\//, sendGameRequestedFile);
app.get(/^\/enter-name.html/, sendTemplatedFile);
app.use(/^\/api\/v0\/install\//, busboy());
app.post(/^\/api\/v0\/install\//, installUploadedFile);
app.use(/^\/api\/inform2/, busboy());
app.post(/^\/api\/inform2/, fakeHFTSitePing);
app.use(/^\/api\/v0\/uploadFile\//, busboy());
app.post(/^\/api\/v0\/uploadFile\//, addUploadedFile);
app.get(/.*/, sendSystemRequestedFile);
Expand Down

0 comments on commit 01876f7

Please sign in to comment.