Improvement: proxy server (#1225)
* added log for proxy server * fix: not proxy client server request * fix: added try catch for proxy server * fix: added disallow reponse headers
This commit is contained in:
@@ -15,6 +15,8 @@ import 'protobufjs';
|
||||
const { fetch: originalFetch } = window;
|
||||
window.fetch = async (...args) => {
|
||||
const [resource, config] = args;
|
||||
if (resource.toString().includes('localhost'))
|
||||
return await originalFetch(resource, config);
|
||||
const _res = await originalFetch('http://localhost:3001/' + resource, {
|
||||
...config,
|
||||
credentials: 'include',
|
||||
|
||||
Reference in New Issue
Block a user