Skip to content

Commit

Permalink
修复因cdn缓存导致的跨域鉴权错误
Browse files Browse the repository at this point in the history
  • Loading branch information
ljxi committed Jan 2, 2024
1 parent f9c9415 commit 2ec18ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ async function apiSolver(){
return
}
let host=runUrl.value.split("NetworkPanelApi://")[1]
let resp:any = await fetch(import.meta.env.VITE_API_URL+"url.ajax?"+new URLSearchParams({host:host}), {
let resp:any = await fetch(import.meta.env.VITE_API_URL+"url.ajax?"+new URLSearchParams({host:host,cache:window.location.host}), {
mode: "cors",
redirect: "follow",
referrerPolicy: "no-referrer"
Expand Down
1 change: 1 addition & 0 deletions src/components/Mark.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ watch(show,(ns,os)=>{
})
const mark:Ref<any>=ref([])
const api =async(args:string[][])=>{
args.push(["cache", window.location.host])
const response = await fetch(import.meta.env.VITE_API_URL+"get.ajax?"+new URLSearchParams(args).toString(), {
mode: "cors",
redirect: "follow",
Expand Down

0 comments on commit 2ec18ca

Please sign in to comment.