Skip to content

Commit e9e7ebe

Browse files
fix: use proxy to fetch PR builds
1 parent e9c6197 commit e9e7ebe

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/shared/backend/services/firmwareStore.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { ZipInfoRaw, unzipRaw } from "unzipit";
33
import ZipHTTPRangeReader from "shared/backend/utils/ZipHTTPRangeReader";
44
import ky from "ky";
55
import config from "shared/backend/config";
6+
import environment from "shared/environment";
67
import { uniqueBy } from "shared/tools";
78
import { GithubClient } from "shared/api/github";
89

@@ -27,6 +28,7 @@ const firmwareBundle = async (url: string): Promise<ZipInfoRaw> => {
2728
? await (async () => {
2829
if (!firmwareBundleBlobs[url]) {
2930
firmwareBundleBlobs[url] = ky(url, {
31+
prefixUrl: !environment.isMain ? config.proxyUrl : undefined,
3032
headers: {
3133
Authorization: config.github.prBuildsKey
3234
? `token ${config.github.prBuildsKey}`

0 commit comments

Comments
 (0)