Open Konard opened 9 months ago
I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.
[X] pages/proxy-server.ts
✅ Commit d9810a8
• Import the necessary modules from 'http' and 'request' packages. • Create a server using 'http.createServer()' method. • In the request handler function, forward the request to 'https://deep.deep.foundation/api/gql' using 'request()' function from 'request' package. • Set the 'Access-Control-Allow-Origin' header in the response to the origin of the web page. • Listen to a specific port for incoming requests.
[X] pages/index.tsx
✅ Commit 834f2c6
• Replace the URL 'https://deep.deep.foundation/api/gql' with the URL of the proxy server.
[X] pages/client-handler.tsx
✅ Commit a6fef31
• Replace the URL 'https://deep.deep.foundation/api/gql' with the URL of the proxy server.
Here are my self-reviews of my changes at sweep/fix-cors-issue
.
Here is the 1st review
Hello, great job on creating the proxy server and updating the URLs in the client-handler.tsx and index.tsx files. However, there are a few changes that need to be made: - In the client-handler.tsx file, the URL of the proxy server needs to be fully specified. This includes the protocol (http or https), the hostname, and the port number. Please update this on lines 71 and 96. - Similarly, in the index.tsx file, the URL of the proxy server needs to be fully specified. Please update this on line 187. Keep up the good work!
I finished incorporating these changes.
🎉 Latest improvements to Sweep:
💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord
Access to XMLHttpRequest at 'https://deep.deep.foundation/api/gql' from origin 'https://3007-deepfoundation-dev-506i7dtb1c7.ws-eu105.gitpod.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
URLs tested: https://deep.deep.foundation/api/gql https://deeplinks.deep.foundation/gql https://3006-deepfoundation-dev-506i7dtb1c7.ws-eu105.gitpod.io/gql
Checklist
- [X] `pages/proxy-server.ts` ✅ Commit [`d9810a8`](https://github.com/deep-foundation/deepcase-app/commit/d9810a8cb88e3d81e074520da5981e371d629250) - [X] `pages/index.tsx` ✅ Commit [`834f2c6`](https://github.com/deep-foundation/deepcase-app/commit/834f2c66c451c95df877b5b6f3523d79f94a1c35) - [X] `pages/client-handler.tsx` ✅ Commit [`a6fef31`](https://github.com/deep-foundation/deepcase-app/commit/a6fef31ef6acfb89fb85596956fc0feef9505188)