Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable local cors policy on dev pdr-websockets #32

Open
1 task
idiom-bytes opened this issue Aug 21, 2023 · 3 comments
Open
1 task

Enable local cors policy on dev pdr-websockets #32

idiom-bytes opened this issue Aug 21, 2023 · 3 comments
Labels
Type: Enhancement New feature or request

Comments

@idiom-bytes
Copy link
Member

Problem

Local dev environments should easily connect to dev BE.
Right now, CORS policy blocks local dev.
image

Solution:

Enable cors policy when deploying in dev environment (GCP VM)

DoD:

  • Local dev client (pdr-web) should connect to dev BE
@idiom-bytes idiom-bytes added the Type: Enhancement New feature or request label Aug 21, 2023
@idiom-bytes idiom-bytes changed the title Enable local cors policy Enable local cors policy on dev pdr-websockets Aug 21, 2023
@KatunaNorbert
Copy link
Member

KatunaNorbert commented Aug 22, 2023

Can't reproduce this issue. Are you on the right branch?
I run pdr-web locally and connected to dev websocket. Also run websocket locally and connect it to dev backend and local pdr-web. I also had a PR to add CORS to websocket API.

Private Zenhub Image

@idiom-bytes
Copy link
Member Author

Yes, I'm still getting this

Access to fetch at 'https://development.oceandao.org/socket/api/v1/initial' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

I'm running off a pretty fresh pdr-web.

I'm trying to connect to remote: development.oceandao.org websocket, development.oceandao.org/subgraph, and development.oceandao.org ganache.

@idiom-bytes
Copy link
Member Author

We're currently ignoring these issues in dev-environment as it's not required for the app to work.

However, if we're testing development, we might want to update cors policy on websockets server to support cors from local

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants