defradb
defradb copied to clipboard
CORS error when using Playground's OpenAPI
The default URL when we start DefraDB is shown at startup to be:
$msg="Providing HTTP API at http://127.0.0.1:9181."
If we open a browser tab at that URL, we get the playground and we can send GraphQL queries without issue. However, when using the OpenAPI tool, the application sends request to localhost
instead of 127.0.0.1
and that is causing CORS errors.
Suggested fix is to ensure that the URL used by the OpenAPI tool is the same as the displayed URL on start.