Skip to content

Commit 79f4ca8

Browse files
ioedeveloperAniket-Engg
authored andcommitted
Use public proxy url
1 parent 82f274f commit 79f4ca8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

apps/noir-compiler/webpack.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ module.exports = composePlugins(withNx(), (config) => {
6464

6565
config.plugins.push(
6666
new webpack.DefinePlugin({
67-
'fetch': `((...args) => args[0].href && (args[0]).href.startsWith('https://github.com') ? fetch('https://common-corsproxy.remixproject.org/?proxy=' + args[0].href) : fetch(...args))`,
67+
'fetch': `((...args) => {
68+
if (args[0].origin === 'https://github.com') {
69+
return fetch('https://api.allorigins.win/raw?url' + args[0])
70+
}
71+
return fetch(...args)
72+
})`,
6873
})
6974
)
7075

0 commit comments

Comments
 (0)