1
0
Fork 0
mirror of synced 2024-10-01 17:47:46 +13:00

Fix build (again).

This commit is contained in:
Sam Rose 2024-02-15 16:12:47 +00:00
parent 3bce1eb308
commit c2c0108e4f
No known key found for this signature in database

View file

@ -75,9 +75,13 @@ export function createRequest(request: Request): RequestInit {
const cookie = ctx.headers[constants.Header.COOKIE],
apiKey = ctx.headers[constants.Header.API_KEY]
if (cookie) {
request.headers[constants.Header.COOKIE] = cookie
headers[constants.Header.COOKIE] = cookie
} else if (apiKey) {
request.headers[constants.Header.API_KEY] = apiKey
if (Array.isArray(apiKey)) {
headers[constants.Header.API_KEY] = apiKey[0]
} else {
headers[constants.Header.API_KEY] = apiKey
}
}
}