From 16210eae6eae842c1f8be044282ced2d9818a693 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Fri, 22 Jul 2022 01:03:43 -0600 Subject: [PATCH 1/2] Make CORS origin not crash the API --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 3d822e8..4f67fc2 100644 --- a/src/main.ts +++ b/src/main.ts @@ -43,7 +43,7 @@ async function init() { port: config.server.port, routes: { cors: { - origin: `*`, + origin: [`*`], credentials: true, }, }, From d24f609c6241edd7219ff4f846c008b784f0f0ad Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Fri, 22 Jul 2022 01:14:14 -0600 Subject: [PATCH 2/2] Update the base URL to account for nginx reverse proxy for SSL --- docs/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/script.js b/docs/script.js index 176131d..2f33a22 100644 --- a/docs/script.js +++ b/docs/script.js @@ -1,7 +1,7 @@ const app = new Vue({ el: `#app`, data() {return { - url: `http://143.110.218.114:42069`, + url: `https://vps.oliver.akins.me/lurk-api`, authenticated: false, channels: [], channel: ``,