Cross origin error thrown on GraphQL subscription

Viewed 557
1 Answers

Hasura uses a special way for dealing with CORS, depending on which environment you are using. If you are using heroku, in your env variables you need to add Hasura specific variables to enable CORS.

HASURA_GRAPHQL_CORS_DOMAIN="https://*.foo.bar.com:8080, http://*.localhost, http://localhost:3000, http://example.com"

Check out the CORS configuration example

Related