Skip to content

Commit

Permalink
fix(backend): Use SSL option for Meilisearch (#10772)
Browse files Browse the repository at this point in the history
  • Loading branch information
caipira113 authored May 5, 2023
1 parent 4a72941 commit ae21b75
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .config/docker_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ redis:
# host: meilisearch
# port: 7700
# apiKey: ''
# ssl: true

# ┌───────────────┐
#───┘ ID generation └───────────────────────────────────────────
Expand Down
1 change: 1 addition & 0 deletions .config/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ redis:
# host: localhost
# port: 7700
# apiKey: ''
# ssl: true

# ┌───────────────┐
#───┘ ID generation └───────────────────────────────────────────
Expand Down
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ redis:
# host: meilisearch
# port: 7700
# apiKey: ''
# ssl: true

# ┌───────────────┐
#───┘ ID generation └───────────────────────────────────────────
Expand Down
1 change: 1 addition & 0 deletions chart/files/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ redis:
# host: localhost
# port: 7700
# apiKey: ''
# ssl: true

# ┌───────────────┐
#───┘ ID generation └───────────────────────────────────────────
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/GlobalModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions packages/backend/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export type Source = {
host: string;
port: string;
apiKey: string;
ssl?: boolean;
};

proxy?: string;
Expand Down

0 comments on commit ae21b75

Please sign in to comment.