feat(setup): add cors option to setup script

This commit is contained in:
jojobii 2023-04-08 21:47:17 -07:00
parent 450d01753d
commit 314c5fbfcc
No known key found for this signature in database
GPG key ID: C17F38C2DFB6883E

View file

@ -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()
})
});
})