Skip to content

Commit 559f5e6

Browse files
committed
Update cors.js
1 parent cdc50cf commit 559f5e6

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

api/cors.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ export default async function handler(request, response) {
1212

1313
return new Promise(resolve => {
1414

15-
const req = https.get({
16-
url: url, headers: {
17-
accept: 'application/json'
18-
}}, (resp) => {
15+
const req = https.request({
16+
url: url,
17+
method: 'GET',
18+
headers: {
19+
accept: 'application/json'
20+
}
21+
}, (resp) => {
1922

2023
let data = '';
2124

0 commit comments

Comments
 (0)