Redirect meilisearch to container
This commit is contained in:
parent
f5d1313858
commit
631725c0f9
|
@ -36,6 +36,17 @@ http {
|
||||||
proxy_read_timeout 60;
|
proxy_read_timeout 60;
|
||||||
proxy_connect_timeout 60;
|
proxy_connect_timeout 60;
|
||||||
}
|
}
|
||||||
|
location /indexes/members/search {
|
||||||
|
proxy_pass http://meilisearch:7700/indexes/members/search;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_cache_bypass $http_upgrade;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_read_timeout 60;
|
||||||
|
proxy_connect_timeout 60;
|
||||||
|
}
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.php?$query_string;
|
try_files $uri $uri/ /index.php?$query_string;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ export default function useSearch() {
|
||||||
const axios = inject('axios');
|
const axios = inject('axios');
|
||||||
async function search(text, filters = []) {
|
async function search(text, filters = []) {
|
||||||
var response = await axios.post(
|
var response = await axios.post(
|
||||||
document.querySelector('meta[name="meilisearch_baseurl"]').content + '/indexes/members/search',
|
'/indexes/members/search',
|
||||||
{
|
{
|
||||||
q: text,
|
q: text,
|
||||||
filter: filters,
|
filter: filters,
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
<meta name="socketport" content="{{env('SOCKET_PORT')}}" />
|
<meta name="socketport" content="{{env('SOCKET_PORT')}}" />
|
||||||
@if(auth()->id())
|
@if(auth()->id())
|
||||||
<meta name="meilisearch_key" content="{{config('scout.meilisearch.key')}}" />
|
<meta name="meilisearch_key" content="{{config('scout.meilisearch.key')}}" />
|
||||||
<meta name="meilisearch_baseurl" content="http://localhost:7700" />
|
|
||||||
@endif
|
@endif
|
||||||
@vite('resources/js/app.js')
|
@vite('resources/js/app.js')
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Reference in New Issue