From a16435249b9e60f69aae863ec6a18e04aa73fee7 Mon Sep 17 00:00:00 2001 From: Jack Date: Tue, 18 Aug 2020 18:13:55 +0100 Subject: [PATCH] gave more memory to the generate code function, added cors --- functions/index.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/functions/index.js b/functions/index.js index ba61bb57f..df5c32588 100644 --- a/functions/index.js +++ b/functions/index.js @@ -139,6 +139,12 @@ exports.changeName = functions.https.onCall((request, response) => { } }); +exports.handler = (req, res) => { + res + .set({ "Access-Control-Allow-Origin": "https://monkey-type.com/" }) + .sendStatus(200); +}; + exports.checkIfNeedsToChangeName = functions.https.onCall( (request, response) => { try { @@ -1128,8 +1134,8 @@ class Leaderboard { exports.generatePairingCode = functions .runWith({ - timeoutSeconds: 60, - memory: "1GB", + timeoutSeconds: 100, + memory: "2GB", }) .https.onCall((request, response) => { try {