vercel / hazel

Lightweight update server for Electron apps
https://twitter.com/notquiteleo/status/893547786255421441
MIT License
2.9k stars 382 forks source link

proxyPrivateDownload can't fetch asset #155

Open 10n37 opened 1 year ago

10n37 commented 1 year ago

I am using hazel programmaticly with private github repo I meet issue that proxyPrivateDownload function always returns 404, if Authorization header is not set.

For example, assetRes without Authorization header:

assetRes: Response {
    size: 0,
    timeout: 0,
    [Symbol(Body internals)]: { body: [Gunzip], disturbed: false, error: null },
    [Symbol(Response internals)]: {
      url: 'https://mytoken@api.github.com/repos/username/myrepo/releases/assets/assetId,
      status: 404,
      statusText: 'Not Found',
      headers: [Headers]
    }
  }

assetRes with Authorization header:

  assetRes: Response {
    size: 0,
    timeout: 0,
    [Symbol(Body internals)]: { body: [PassThrough], disturbed: false, error: null },
    [Symbol(Response internals)]: {
      url: 'https://mytoken@api.github.com/repos/username/myrepo/releases/assets/assetId',
      status: 302,
      statusText: 'Found',
      headers: [Headers]
    }
  },

Please, resolve this issue. I can't use hazel because of this problem.

10n37 commented 1 year ago

Please, it's just 1 line of code. This can't be true