Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyiya committed Aug 12, 2024
1 parent 52e7c07 commit 29bdc88
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/shared/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,18 @@ axios.interceptors.request.use((config) => {
}
})

if (document.location.search.includes('cors')) {
localStorage.setItem('cors', '1')
if (document.location.search.includes('noproxy')) {
localStorage.setItem('noproxy', '1')
}

if (document.location.search.includes('nocors')) {
localStorage.removeItem('cors')
if (document.location.search.includes('proxy')) {
localStorage.removeItem('noproxy')
}

const corsAxios = http.create<R.Response<any>>(
// https://cors-flame.vercel.app/api/cors
// https://cors.jinlilili.top/api/cors?url=
localStorage.getItem('cors') == null ? 'https://cli.airmole.net' : ''
localStorage.getItem('noproxy') ? '' : 'https://cli.airmole.net'
)

export { axios, corsAxios }

0 comments on commit 29bdc88

Please sign in to comment.