Pass go headers through in updater/differential
This commit is contained in:
parent
637b67d9a5
commit
da7a76e03f
2 changed files with 9 additions and 1 deletions
|
@ -76,6 +76,12 @@ describe('updater/differential', () => {
|
|||
|
||||
beforeEach(callback => {
|
||||
server = http.createServer(async (req, res) => {
|
||||
if (!req.headers['user-agent']?.includes('Signal-Desktop')) {
|
||||
res.writeHead(403);
|
||||
res.end(`Invalid user agent: "${req.headers['user-agent']}"`);
|
||||
return;
|
||||
}
|
||||
|
||||
const file = req.url?.slice(1) ?? '';
|
||||
if (!allowedFiles.has(file)) {
|
||||
res.writeHead(404);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue