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:
nyagami
2024-10-16 15:02:44 +07:00
committed by GitHub
parent 326d5414e9
commit 9380542719
2 changed files with 49 additions and 23 deletions
+2
View File
@@ -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',