mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2025-04-23 13:08:11 +00:00
patch comkey path to fallback
This commit is contained in:
parent
718062d033
commit
0b454016cf
2 changed files with 9 additions and 3 deletions
|
@ -1,11 +1,14 @@
|
||||||
const crypto = require("crypto");
|
const crypto = require("crypto");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
|
||||||
const keyPath =
|
const keyPath =
|
||||||
process.env.NODE_ENV === "development"
|
process.env.NODE_ENV === "development"
|
||||||
? path.resolve(__dirname, `../../../server/storage/comkey`)
|
? path.resolve(__dirname, `../../../server/storage/comkey`)
|
||||||
: path.resolve(process.env.STORAGE_DIR, `comkey`);
|
: path.resolve(
|
||||||
|
process.env.STORAGE_DIR ??
|
||||||
|
path.resolve(__dirname, `../../../server/storage`),
|
||||||
|
`comkey`
|
||||||
|
);
|
||||||
|
|
||||||
class CommunicationKey {
|
class CommunicationKey {
|
||||||
#pubKeyName = "ipc-pub.pem";
|
#pubKeyName = "ipc-pub.pem";
|
||||||
|
|
|
@ -4,7 +4,10 @@ const path = require("path");
|
||||||
const keyPath =
|
const keyPath =
|
||||||
process.env.NODE_ENV === "development"
|
process.env.NODE_ENV === "development"
|
||||||
? path.resolve(__dirname, `../../storage/comkey`)
|
? path.resolve(__dirname, `../../storage/comkey`)
|
||||||
: path.resolve(process.env.STORAGE_DIR, `comkey`);
|
: path.resolve(
|
||||||
|
process.env.STORAGE_DIR ?? path.resolve(__dirname, `../../storage`),
|
||||||
|
`comkey`
|
||||||
|
);
|
||||||
|
|
||||||
// What does this class do?
|
// What does this class do?
|
||||||
// This class generates a hashed version of some text (typically a JSON payload) using a rolling RSA key
|
// This class generates a hashed version of some text (typically a JSON payload) using a rolling RSA key
|
||||||
|
|
Loading…
Add table
Reference in a new issue