Compare commits

...
1 Commits
Author SHA1 Message Date
Lncvrt a433f57a58 Add authorization header to versions (not in use yet) 2026-10-02 10:47:59 -07:00
2 changed files with 7 additions and 1 deletions

No files matched your search

+2 -1
View File
@@ -986,7 +986,8 @@ app.get('/launcher/versions', context => launcherVersionsHandler(context), {
hide: true
})
),
clientplatform: t.Optional(t.String())
clientplatform: t.Optional(t.String()),
authorization: t.Optional(t.String())
})
})
app.get('/launcher/latest', launcherLatestHandler, {
+5
View File
@@ -9,6 +9,11 @@ export const handler = async (context: Context) => {
return jsonResponse({ error: 'Failed to connect to database' }, 500)
const { connection, db } = dbResult
const authorization =
context.headers.authorization?.trim() == '' ||
context.headers.authorization == null
? null
: context.headers.authorization
const clientplatform = context.headers.clientplatform
const platform = clientplatform?.split('-')[0]
const arch = clientplatform?.split('-')[1]