add cors option to setup script

Merge pull request #113 from jojobii-arks/jojobii-arks/112
This commit is contained in:
wukko 2023-04-09 18:05:24 +06:00 committed by GitHub
commit e4eac5bebe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,6 +42,12 @@ rl.question(q, r1 => {
rl.question(q, r2 => { rl.question(q, r2 => {
if (r2) ob['port'] = r2 if (r2) ob['port'] = r2
if (!r1 && r2) ob['selfURL'] = `http://localhost:${r2}/` if (!r1 && r2) ob['selfURL'] = `http://localhost:${r2}/`
console.log(Bright("\nWould you like to enable CORS? It allows other websites and extensions to use your instance's API.\n y/n (n)"))
rl.question(q, r3 => {
if (r3.toLowerCase() !== 'y') ob['cors'] = '0'
final() final()
})
}); });
}) })