Skip to content

Commit 6420376

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

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

api/cors.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ export default async function handler(request, response) {
1212

1313
return new Promise(resolve => {
1414

15+
url = new URL(url);
16+
1517
const req = https.request({
16-
url: url,
18+
host: url.hostname,
19+
path: url.pathname + url.search,
1720
method: 'GET',
1821
headers: {
1922
accept: 'application/json'

0 commit comments

Comments
 (0)