File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1150,12 +1150,11 @@ const getMeilisearchConfig = (): SearchConfig => {
11501150 const isDevelopment = window . location . hostname === 'localhost' || window . location . hostname === '127.0.0.1' ;
11511151
11521152 if ( isProduction || isNetlifyPreview || isTestingBranch || isDevelopment ) {
1153- // Always use Netlify functions for production and previews to keep API key secure
1154- const useNetlifyFunctions = isProduction || isNetlifyPreview || window . location . hostname . includes ( 'netlify.app' ) ;
1153+ const isNetlify = window . location . hostname . includes ( 'netlify.app' ) || isNetlifyPreview ;
11551154
11561155 return {
11571156 enabled : true ,
1158- hostUrl : useNetlifyFunctions ?
1157+ hostUrl : isNetlify ?
11591158 `${ window . location . origin } /.netlify/functions/meilisearch` :
11601159 "https://ms-3ade175771ef-34593.sfo.meilisearch.io" ,
11611160 apiKey : "" ,
You can’t perform that action at this time.
0 commit comments