mirror of
https://github.com/willchen96/mike.git
synced 2026-07-20 23:21:03 +02:00
fix: require dedicated download signing secret
This commit is contained in:
parent
2f24cae407
commit
ea48cdedd5
1 changed files with 2 additions and 4 deletions
|
|
@ -10,12 +10,10 @@ import crypto from "crypto";
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getSecret(): string {
|
function getSecret(): string {
|
||||||
const secret =
|
const secret = process.env.DOWNLOAD_SIGNING_SECRET;
|
||||||
process.env.DOWNLOAD_SIGNING_SECRET ??
|
|
||||||
process.env.SUPABASE_SECRET_KEY;
|
|
||||||
if (!secret) {
|
if (!secret) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"DOWNLOAD_SIGNING_SECRET (or SUPABASE_SECRET_KEY as a fallback) must be set. " +
|
"DOWNLOAD_SIGNING_SECRET must be set. " +
|
||||||
"Generate a strong random value (e.g. `openssl rand -hex 32`) and set it in the environment.",
|
"Generate a strong random value (e.g. `openssl rand -hex 32`) and set it in the environment.",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue