Skip to content

Commit

Permalink
fix: Use http instead of https to communicate with Auth Servers
Browse files Browse the repository at this point in the history
Apparently the Auth Servers only support HTTP rather than HTTPS...
  • Loading branch information
Tandashi committed Oct 24, 2023
1 parent b01367a commit f273f40
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,16 +187,15 @@ function createWindow(): void {
const serverModsVersionPath = path.join(serverModsDownloadPath, 'version.json')
const gameDirPath = path.join(args.basePath, args.gameVersion == 1 ? 'highRes' : 'lowRes', 'KnockoutCity')

const protocol = args.server.addr.startsWith('127.0.0.1:23600') ? 'http' : 'https'
const result = (await axios.get(`${protocol}://${args.server.addr}/mods/list`)).data
const result = (await axios.get(`http://${args.server.addr}/mods/list`)).data

const downloadMods = async () => {
if (result.length === 0) {
return
}

const content = await (
await fetch(`${protocol}://${args.server.addr}/mods/download`)
await fetch(`http://${args.server.addr}/mods/download`)
).arrayBuffer()

const zip = new JSZip()
Expand Down

0 comments on commit f273f40

Please sign in to comment.