summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaipira <caipira@libnare.net>2023-05-06 04:02:34 +0900
committerGitHub <noreply@github.com>2023-05-06 04:02:34 +0900
commitae21b75687df9f85a7d4c3176ca591b3c63e85e7 (patch)
tree4e1c0cdc5f45a38a9029d4b27dd6cb4e2f6bdcb4
parentperf: use slacc on check-word-mute (#10721) (diff)
downloadsharkey-ae21b75687df9f85a7d4c3176ca591b3c63e85e7.tar.gz
sharkey-ae21b75687df9f85a7d4c3176ca591b3c63e85e7.tar.bz2
sharkey-ae21b75687df9f85a7d4c3176ca591b3c63e85e7.zip
fix(backend): Use SSL option for Meilisearch (#10772)
-rw-r--r--.config/docker_example.yml1
-rw-r--r--.config/example.yml1
-rw-r--r--.devcontainer/devcontainer.yml1
-rw-r--r--chart/files/default.yml1
-rw-r--r--packages/backend/src/GlobalModule.ts2
-rw-r--r--packages/backend/src/config.ts1
6 files changed, 6 insertions, 1 deletions
diff --git a/.config/docker_example.yml b/.config/docker_example.yml
index 6946954ce5..39682e1542 100644
--- a/.config/docker_example.yml
+++ b/.config/docker_example.yml
@@ -102,6 +102,7 @@ redis:
# host: meilisearch
# port: 7700
# apiKey: ''
+# ssl: true
# ┌───────────────┐
#───┘ ID generation └───────────────────────────────────────────
diff --git a/.config/example.yml b/.config/example.yml
index 5861176677..ef8373c4da 100644
--- a/.config/example.yml
+++ b/.config/example.yml
@@ -102,6 +102,7 @@ redis:
# host: localhost
# port: 7700
# apiKey: ''
+# ssl: true
# ┌───────────────┐
#───┘ ID generation └───────────────────────────────────────────
diff --git a/.devcontainer/devcontainer.yml b/.devcontainer/devcontainer.yml
index e1b89c25bd..1d761ae75e 100644
--- a/.devcontainer/devcontainer.yml
+++ b/.devcontainer/devcontainer.yml
@@ -102,6 +102,7 @@ redis:
# host: meilisearch
# port: 7700
# apiKey: ''
+# ssl: true
# ┌───────────────┐
#───┘ ID generation └───────────────────────────────────────────
diff --git a/chart/files/default.yml b/chart/files/default.yml
index f50c38d57e..342c6091f0 100644
--- a/chart/files/default.yml
+++ b/chart/files/default.yml
@@ -123,6 +123,7 @@ redis:
# host: localhost
# port: 7700
# apiKey: ''
+# ssl: true
# ┌───────────────┐
#───┘ ID generation └───────────────────────────────────────────
diff --git a/packages/backend/src/GlobalModule.ts b/packages/backend/src/GlobalModule.ts
index 2f4862285d..5fb4e8ef3c 100644
--- a/packages/backend/src/GlobalModule.ts
+++ b/packages/backend/src/GlobalModule.ts
@@ -28,7 +28,7 @@ const $meilisearch: Provider = {
useFactory: (config) => {
if (config.meilisearch) {
return new MeiliSearch({
- host: `http://${config.meilisearch.host}:${config.meilisearch.port}`,
+ host: `${config.meilisearch.ssl ? 'https' : 'http' }://${config.meilisearch.host}:${config.meilisearch.port}`,
apiKey: config.meilisearch.apiKey,
});
} else {
diff --git a/packages/backend/src/config.ts b/packages/backend/src/config.ts
index 7354268a4d..b41fb603bb 100644
--- a/packages/backend/src/config.ts
+++ b/packages/backend/src/config.ts
@@ -61,6 +61,7 @@ export type Source = {
host: string;
port: string;
apiKey: string;
+ ssl?: boolean;
};
proxy?: string;