Skip to content

best way to save what you love

feat(setup): add cors option to setup script

jojobii314c5fbfcc1e
diff --git a/src/modules/setup.js b/src/modules/setup.js
index aa64370e..1cd82ab2 100644
--- a/src/modules/setup.js
+++ b/src/modules/setup.js
@@ -42,6 +42,12 @@ rl.question(q, r1 => {
rl.question(q, r2 => {
if (r2) ob['port'] = r2
if (!r1 && r2) ob['selfURL'] = `http://localhost:${r2}/`
- final()
+
+ console.log(Bright("\nIf you would like to enable CORS, enter 'y'. (y)\nCORS allows other websites and extensions to use your instance's API."))
+
+ rl.question(q, r3 => {
+ if (r3.toLowerCase() !== 'y') ob['cors'] = '0'
+ final()
+ })
});
})