mirror of
https://github.com/infinilabs/coco-app.git
synced 2025-12-16 11:37:47 +01:00
chore: add cross-domain configuration for web component (#921)
* chore: add cross-domain configuration for web component * docs: add release note
This commit is contained in:
@@ -29,6 +29,7 @@ fix: WM ext does not work when operating focused win from another display #919
|
||||
|
||||
refactor: improve sorting logic of search results #910
|
||||
style: add dark drop shadow to images #912
|
||||
chore: add cross-domain configuration for web component #921
|
||||
|
||||
## 0.8.0 (2025-09-28)
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import axios from "axios";
|
||||
|
||||
axios.defaults.withCredentials = true;
|
||||
|
||||
import { useAppStore } from "@/stores/appStore";
|
||||
|
||||
import {
|
||||
@@ -78,7 +80,7 @@ export const Get = <T>(
|
||||
}
|
||||
|
||||
axios
|
||||
.get(baseURL + url, { params })
|
||||
.get(baseURL + url, { params, withCredentials: true })
|
||||
.then((result) => {
|
||||
let res: FcResponse<T>;
|
||||
if (clearFn !== undefined) {
|
||||
@@ -110,10 +112,15 @@ export const Post = <T>(
|
||||
}
|
||||
|
||||
axios
|
||||
.post(baseURL + url, data, {
|
||||
params,
|
||||
headers,
|
||||
} as any)
|
||||
.post(
|
||||
baseURL + url,
|
||||
data,
|
||||
{
|
||||
params,
|
||||
headers,
|
||||
withCredentials: true,
|
||||
} as any
|
||||
)
|
||||
.then((result) => {
|
||||
resolve([null, result.data as FcResponse<T>]);
|
||||
})
|
||||
|
||||
@@ -34,6 +34,7 @@ export async function streamPost({
|
||||
...(headersStorage),
|
||||
...(headers || {}),
|
||||
},
|
||||
credentials: "include",
|
||||
body: JSON.stringify(body),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user