🪻 distributed transcription service thistle.dunkirk.sh

chore: remove hardcoded thistle.app

dunkirk.sh 20300ab9 25a3387a

verified
Changed files
+4 -11
src
+3 -10
src/lib/passkey.ts
···
* Get RP ID and origin based on environment
*/
function getRPConfig(): { rpID: string; rpName: string; origin: string } {
-
if (process.env.NODE_ENV === "production") {
-
return {
-
rpID: process.env.RP_ID || "thistle.app",
-
rpName: "Thistle",
-
origin: process.env.ORIGIN || "https://thistle.app",
-
};
-
}
return {
-
rpID: "localhost",
-
rpName: "Thistle (Dev)",
-
origin: "http://localhost:3000",
+
rpID: process.env.RP_ID || "localhost",
+
rpName: "Thistle",
+
origin: process.env.ORIGIN || "http://localhost:3000",
};
}
+1 -1
src/lib/vtt-cleaner.ts
···
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${apiKey}`,
-
"HTTP-Referer": "https://thistle.app",
+
"HTTP-Referer": process.env.ORIGIN || "http://localhost:3000",
"X-Title": `Thistle Transcription Chunk ${chunkIndex}`,
},
body: JSON.stringify({