|
|
@ -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 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|