fix(backend): Use SSL option for Meilisearch (#10772)
This commit is contained in:
		
							parent
							
								
									4a72941eda
								
							
						
					
					
						commit
						ae21b75687
					
				
					 6 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
					@ -102,6 +102,7 @@ redis:
 | 
				
			||||||
#  host: meilisearch
 | 
					#  host: meilisearch
 | 
				
			||||||
#  port: 7700
 | 
					#  port: 7700
 | 
				
			||||||
#  apiKey: ''
 | 
					#  apiKey: ''
 | 
				
			||||||
 | 
					#  ssl: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#   ┌───────────────┐
 | 
					#   ┌───────────────┐
 | 
				
			||||||
#───┘ ID generation └───────────────────────────────────────────
 | 
					#───┘ ID generation └───────────────────────────────────────────
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -102,6 +102,7 @@ redis:
 | 
				
			||||||
#  host: localhost
 | 
					#  host: localhost
 | 
				
			||||||
#  port: 7700
 | 
					#  port: 7700
 | 
				
			||||||
#  apiKey: ''
 | 
					#  apiKey: ''
 | 
				
			||||||
 | 
					#  ssl: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#   ┌───────────────┐
 | 
					#   ┌───────────────┐
 | 
				
			||||||
#───┘ ID generation └───────────────────────────────────────────
 | 
					#───┘ ID generation └───────────────────────────────────────────
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -102,6 +102,7 @@ redis:
 | 
				
			||||||
#  host: meilisearch
 | 
					#  host: meilisearch
 | 
				
			||||||
#  port: 7700
 | 
					#  port: 7700
 | 
				
			||||||
#  apiKey: ''
 | 
					#  apiKey: ''
 | 
				
			||||||
 | 
					#  ssl: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#   ┌───────────────┐
 | 
					#   ┌───────────────┐
 | 
				
			||||||
#───┘ ID generation └───────────────────────────────────────────
 | 
					#───┘ ID generation └───────────────────────────────────────────
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -123,6 +123,7 @@ redis:
 | 
				
			||||||
#  host: localhost
 | 
					#  host: localhost
 | 
				
			||||||
#  port: 7700
 | 
					#  port: 7700
 | 
				
			||||||
#  apiKey: ''
 | 
					#  apiKey: ''
 | 
				
			||||||
 | 
					#  ssl: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#   ┌───────────────┐
 | 
					#   ┌───────────────┐
 | 
				
			||||||
#───┘ ID generation └───────────────────────────────────────────
 | 
					#───┘ ID generation └───────────────────────────────────────────
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -28,7 +28,7 @@ const $meilisearch: Provider = {
 | 
				
			||||||
	useFactory: (config) => {
 | 
						useFactory: (config) => {
 | 
				
			||||||
		if (config.meilisearch) {
 | 
							if (config.meilisearch) {
 | 
				
			||||||
			return new 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,
 | 
									apiKey: config.meilisearch.apiKey,
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -61,6 +61,7 @@ export type Source = {
 | 
				
			||||||
		host: string;
 | 
							host: string;
 | 
				
			||||||
		port: string;
 | 
							port: string;
 | 
				
			||||||
		apiKey: string;
 | 
							apiKey: string;
 | 
				
			||||||
 | 
							ssl?: boolean;
 | 
				
			||||||
	};
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	proxy?: string;
 | 
						proxy?: string;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue