Update index.mjs
This commit is contained in:
parent
60c9e91135
commit
1c9b69e15b
1 changed files with 5 additions and 2 deletions
|
@ -67,6 +67,9 @@ async function main(port) {
|
|||
const hostname = '127.0.0.1';
|
||||
|
||||
const server = http.createServer((req, res) => {
|
||||
res.setHeader('Access-Control-Allow-Origin', '*'); // Adjust as needed
|
||||
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');
|
||||
res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization');
|
||||
res.statusCode = 200;
|
||||
|
||||
// Create URL object and parse query parameters
|
||||
|
|
Loading…
Reference in a new issue