cors config
This commit is contained in:
parent
21a19e6db7
commit
ef4104a186
@ -60,21 +60,12 @@ export const cachedEventsLength = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const corsConfig = (rpcUrl) => ({
|
export const httpConfig = {
|
||||||
headers: [
|
|
||||||
{
|
|
||||||
name: 'Access-Control-Allow-Origin',
|
|
||||||
value: rpcUrl
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Access-Control-Allow-Methods',
|
|
||||||
value: 'POST, GET, OPTIONS'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
withCredentials: false,
|
withCredentials: false,
|
||||||
// buffer for tor connections
|
// buffer for tor connections
|
||||||
timeout: 30000
|
timeout: 30000,
|
||||||
})
|
keepAlive: true
|
||||||
|
}
|
||||||
|
|
||||||
export const PROVIDERS = {
|
export const PROVIDERS = {
|
||||||
walletConnect: {
|
walletConnect: {
|
||||||
|
@ -39,7 +39,7 @@ const defaultOptions = {
|
|||||||
|
|
||||||
const client = new ApolloClient({
|
const client = new ApolloClient({
|
||||||
uri: link,
|
uri: link,
|
||||||
credentials: 'same-origin',
|
credentials: 'omit',
|
||||||
cache: new InMemoryCache(),
|
cache: new InMemoryCache(),
|
||||||
defaultOptions
|
defaultOptions
|
||||||
})
|
})
|
||||||
@ -47,7 +47,7 @@ const client = new ApolloClient({
|
|||||||
const registryClient = new ApolloClient({
|
const registryClient = new ApolloClient({
|
||||||
uri: 'https://api.thegraph.com/subgraphs/name/tornadocash/tornado-relayer-registry',
|
uri: 'https://api.thegraph.com/subgraphs/name/tornadocash/tornado-relayer-registry',
|
||||||
cache: new InMemoryCache(),
|
cache: new InMemoryCache(),
|
||||||
credentials: 'same-origin',
|
credentials: 'omit',
|
||||||
defaultOptions
|
defaultOptions
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user