pull/4791/head
Your Name 6 months ago
parent c0497fbd4d
commit 087dd2c262
  1. 17
      apps/remix-ide/src/app/files/dgitProvider.ts

@ -91,7 +91,7 @@ class DGitProvider extends Plugin {
const token = await this.call('config' as any, 'getAppParameter', 'settings/gist-access-token') const token = await this.call('config' as any, 'getAppParameter', 'settings/gist-access-token')
let config = { let config = {
corsProxy: null, corsProxy: 'https://corsproxy.remixproject.org/',
http, http,
onAuth: url => { onAuth: url => {
url url
@ -105,20 +105,20 @@ class DGitProvider extends Plugin {
if(input.url) { if(input.url) {
const url = new URL(input.url) const url = new URL(input.url)
if (url.hostname.includes('github.com')) { if (url.hostname.includes('localhost')) {
config = { config = {
...config, ...config,
corsProxy: 'https://corsproxy.remixproject.org/', corsProxy: null
} }
} }
} }
if((input.remote && input.remote.url)) { if((input.remote && input.remote.url)) {
const url = new URL(input.remote.url) const url = new URL(input.remote.url)
if (url.hostname.includes('github.com')) { if (url.hostname.includes('localhost')) {
config = { config = {
...config, ...config,
corsProxy: 'https://corsproxy.remixproject.org/', corsProxy: null,
} }
} }
} }
@ -130,6 +130,13 @@ class DGitProvider extends Plugin {
} }
} }
if(input.provider && input.provider === 'localhost') {
config = {
...config,
corsProxy: null
}
}
return config return config
} }

Loading…
Cancel
Save