feat: update source files, Dockerfile, vite config and service worker

This commit is contained in:
2026-02-21 16:25:42 +00:00
parent 5e5aad54cb
commit 5c100a015d
11 changed files with 287 additions and 275 deletions
+10 -2
View File
@@ -1,3 +1,5 @@
import logger from "../../debugConfig"
interface SearXNGResult {
title?: string
url?: string
@@ -26,19 +28,25 @@ export class SearchService {
engines: 'google,bing,duckduckgo',
})
const url = `${import.meta.env.VITE_FRONTEND_SITE_URL}/searxng-api/search?${searchParams.toString()}`
const url = `/searxng-api/search?${searchParams.toString()}`
logger.debug('search-service', "Search URL: ", url)
const response = await fetch(url, {
method: 'GET',
headers: {
'Accept': 'application/json',
},
})
logger.debug('search-service', "Search response: ", response)
if (!response.ok) {
throw new Error(`Search failed with status: ${response.status}`)
}
const data = await response.json()
logger.debug('search-service', "Search data: ", data)
return (data.results || []).map((result: SearXNGResult) => ({
title: result.title || '',
url: result.url || '',