Skip to content

Commit 4426d9b

Browse files
authored
Merge pull request #16 from microlinkhq/next
Next
2 parents 853602c + daeab89 commit 4426d9b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
],
2727
"dependencies": {
2828
"@microlink/mql": "~0.10.28",
29-
"next": "~12.3.0",
29+
"next": "~13.0.0",
3030
"react": "~18.2.0",
3131
"react-dom": "~18.2.0"
3232
},

pages/api/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ const NODE_ENV = process.env.NODE_ENV
88
const API_ENDPOINT = process.env.API_ENDPOINT || 'https://pro.microlink.io'
99
const API_KEY = process.env.API_KEY
1010

11-
const origins = process.env.ORIGINS.split(',').map(n => n.trim())
11+
const origins = process.env.ORIGINS?.split(',').map(n => n.trim())
12+
1213
const isProduction = NODE_ENV === 'production'
1314

1415
const isAllowedDomain =
15-
isProduction && origins.length > 0
16+
isProduction && Array.isArray(origins)
1617
? origin => origins.includes(origin)
1718
: () => true
1819

0 commit comments

Comments
 (0)