mirror of
https://github.com/infinilabs/coco-app.git
synced 2025-12-16 19:47:43 +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
|
refactor: improve sorting logic of search results #910
|
||||||
style: add dark drop shadow to images #912
|
style: add dark drop shadow to images #912
|
||||||
|
chore: add cross-domain configuration for web component #921
|
||||||
|
|
||||||
## 0.8.0 (2025-09-28)
|
## 0.8.0 (2025-09-28)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
|
||||||
|
axios.defaults.withCredentials = true;
|
||||||
|
|
||||||
import { useAppStore } from "@/stores/appStore";
|
import { useAppStore } from "@/stores/appStore";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -78,7 +80,7 @@ export const Get = <T>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
axios
|
axios
|
||||||
.get(baseURL + url, { params })
|
.get(baseURL + url, { params, withCredentials: true })
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
let res: FcResponse<T>;
|
let res: FcResponse<T>;
|
||||||
if (clearFn !== undefined) {
|
if (clearFn !== undefined) {
|
||||||
@@ -110,10 +112,15 @@ export const Post = <T>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
axios
|
axios
|
||||||
.post(baseURL + url, data, {
|
.post(
|
||||||
params,
|
baseURL + url,
|
||||||
headers,
|
data,
|
||||||
} as any)
|
{
|
||||||
|
params,
|
||||||
|
headers,
|
||||||
|
withCredentials: true,
|
||||||
|
} as any
|
||||||
|
)
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
resolve([null, result.data as FcResponse<T>]);
|
resolve([null, result.data as FcResponse<T>]);
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ export async function streamPost({
|
|||||||
...(headersStorage),
|
...(headersStorage),
|
||||||
...(headers || {}),
|
...(headers || {}),
|
||||||
},
|
},
|
||||||
|
credentials: "include",
|
||||||
body: JSON.stringify(body),
|
body: JSON.stringify(body),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user