mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 08:53:48 +01:00
Add ssl option to MeiliSearch config
This commit is contained in:
parent
856e0359d5
commit
591639e570
@ -87,6 +87,7 @@ redis:
|
|||||||
#meilisearch:
|
#meilisearch:
|
||||||
# host: meilisearch
|
# host: meilisearch
|
||||||
# port: 7700
|
# port: 7700
|
||||||
|
# ssl: false
|
||||||
# apiKey:
|
# apiKey:
|
||||||
|
|
||||||
# ┌───────────────┐
|
# ┌───────────────┐
|
||||||
|
@ -39,11 +39,11 @@ export type Source = {
|
|||||||
collection?: string;
|
collection?: string;
|
||||||
bucket?: string;
|
bucket?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
meilisearch: {
|
meilisearch: {
|
||||||
host: string;
|
host: string;
|
||||||
port: number;
|
port: number;
|
||||||
apiKey?: string;
|
apiKey?: string;
|
||||||
|
ssl: boolean
|
||||||
};
|
};
|
||||||
|
|
||||||
proxy?: string;
|
proxy?: string;
|
||||||
|
@ -20,9 +20,10 @@ const hasConfig =
|
|||||||
const host = hasConfig ? config.meilisearch.host ?? "localhost" : "";
|
const host = hasConfig ? config.meilisearch.host ?? "localhost" : "";
|
||||||
const port = hasConfig ? config.meilisearch.port ?? 7700 : 0;
|
const port = hasConfig ? config.meilisearch.port ?? 7700 : 0;
|
||||||
const auth = hasConfig ? config.meilisearch.apiKey ?? "" : "";
|
const auth = hasConfig ? config.meilisearch.apiKey ?? "" : "";
|
||||||
|
const ssl = hasConfig ? config.meilisearch.ssl ?? false : false;
|
||||||
|
|
||||||
const client: MeiliSearch = new MeiliSearch({
|
const client: MeiliSearch = new MeiliSearch({
|
||||||
host: `http://${host}:${port}`,
|
host: `${ssl ? "https" : "http"}://${host}:${port}`,
|
||||||
apiKey: auth,
|
apiKey: auth,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user