headers-api-everywhere: Add headers to all api calls

This commit is contained in:
Colin Campbell
2024-08-22 10:12:03 +02:00
parent 95a4d9f357
commit ca2c127cbd
6 changed files with 19 additions and 13 deletions

View File

@@ -4,6 +4,7 @@ import { useQuery } from "@tanstack/react-query"
import { Skeleton } from "antd"
import { cleanUrl } from "@/libs/clean-url"
import { Descriptions } from "antd"
import fetcher from "@/libs/fetcher"
export const AboutApp = () => {
const { t } = useTranslation("settings")
@@ -14,7 +15,7 @@ export const AboutApp = () => {
const chromeVersion = browser.runtime.getManifest().version
try {
const url = await getOllamaURL()
const req = await fetch(`${cleanUrl(url)}/api/version`)
const req = await fetcher(`${cleanUrl(url)}/api/version`)
if (!req.ok) {
return {