Skip to content
New issue

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

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

Already on GitHub? # to your account

CORS configuration for rest server missing #222

Closed
webmaster128 opened this issue Jul 26, 2020 · 3 comments
Closed

CORS configuration for rest server missing #222

webmaster128 opened this issue Jul 26, 2020 · 3 comments
Assignees

Comments

@webmaster128
Copy link
Member

Up to wasmd 0.9.x we used the CORS flag

docker exec "$CONTAINER_NAME" \
  wasmcli rest-server \
  --node tcp://localhost:26657 \
  --trust-node \
  --cors \
  --laddr "tcp://0.0.0.0:$REST_PORT_GUEST" \
  > "$REST_SERVER_LOGFILE" &

to allow requests from any URL in browsers. With 0.10.0-alpha , the --cors flag was removed (ERROR: unknown flag: --cors).

There is now an --unsafe-cors flag documented in Cosmos SDK. But when I try to use it with wasmd 0.10.0-alpha right after --trust-node, I get the error ERROR: unknown flag: --unsafe-cors.

Is there a way to configure CORS to allow all origins?

@ethanfrey
Copy link
Member

This was added in master, but not in launchpad: cosmos/cosmos-sdk#5671

I will discuss to see if we can get this in launchpad 0.39.1

@ethanfrey
Copy link
Member

It will be in launchpad v0.39.1: cosmos/cosmos-sdk#6853

--unsafe-cors is exposed in #224 (please let me know if this works for you and I will merge to master)

@ethanfrey
Copy link
Member

Closed by #224

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants