Skip to content

Commit

Permalink
Merge pull request #966 from areed/etag
Browse files Browse the repository at this point in the history
Set X-Kurl-Hash header in script response
  • Loading branch information
areed authored Dec 10, 2020
2 parents a90f8f3 + 8e40502 commit ea7b074
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions web/src/controllers/Scripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export class Installers {
logger.error(`Failed to save saas script event: ${err.message}`);
}

response.set("X-Kurl-Hash", installer.hash());
response.status(200);
return this.templates.renderInstallScript(installer);
}
Expand All @@ -76,6 +77,7 @@ export class Installers {
): Promise<string> {
const installer = Installer.latest().resolve();

response.set("X-Kurl-Hash", installer.hash());
response.status(200);
return this.templates.renderInstallScript(installer);
}
Expand All @@ -99,6 +101,7 @@ export class Installers {
}
installer = installer.resolve();

response.set("X-Kurl-Hash", installer.hash());
response.status(200);
return this.templates.renderJoinScript(installer);
}
Expand All @@ -122,6 +125,7 @@ export class Installers {
}
installer = installer.resolve();

response.set("X-Kurl-Hash", installer.hash());
response.status(200);
return this.templates.renderUpgradeScript(installer);
}
Expand All @@ -139,6 +143,7 @@ export class Installers {
}
installer = installer.resolve();

response.set("X-Kurl-Hash", installer.hash());
response.status(200);
return this.templates.renderTasksScript();
}
Expand Down

0 comments on commit ea7b074

Please sign in to comment.