Use headers instead of params

This commit is contained in:
Lncvrt committed 2026-04-26 18:14:00 -07:00
1 parent f9e67fee0f
commit 998fb6d309
3 files changed
+52 -7

No files matched your search

+16 -2
View File
@@ -271,7 +271,14 @@ export default function RootLayout ({
setVersion(client)
try {
const response = await fetch(
`https://games.lncvrt.xyz/api/launcher/versions?platform=${platform()}&arch=${arch()}`
'https://games.lncvrt.xyz/api/launcher/versions',
{
headers: {
Requester: 'LncvrtGamesLauncherClient',
ClientVersion: await app.getVersion(),
ClientPlatform: platform() + '-' + arch()
}
}
)
const signature = response.headers.get('x-signature') ?? ''
const data = await response.json()
@@ -509,7 +516,14 @@ export default function RootLayout ({
(downloadInfo.type == 1
? info.modSupportDownload
: downloadInfo.modDownload)) +
(downloadInfo.type == 2 ? '&modId=' + downloadInfo.modId : '')
(downloadInfo.type == 2 ? '&modId=' + downloadInfo.modId : ''),
{
headers: {
Requester: 'LncvrtGamesLauncherClient',
ClientVersion: await app.getVersion(),
ClientPlatform: platform() + '-' + arch()
}
}
)
const signature = downloadInfoRequest.headers.get('x-signature') ?? ''
const data = await downloadInfoRequest.json()