mina-indexer
mina-indexer copied to clipboard
GraphQL and REST web endpoints do not allow for CORS
Response should contain the following in the response header:
Access-Control-Allow-Origin: *
I enabled this at the Cloudflare layer.
However, I am also planning to enable at the Indexer HTTP server layer.
CORS is already enabled in the indexer: https://github.com/Granola-Team/mina-indexer/blob/main/rust/src/web/mod.rs#L53
CORS is already enabled in the indexer: https://github.com/Granola-Team/mina-indexer/blob/main/rust/src/web/mod.rs#L53
Actually, it is not.
All origins, methods, request headers and exposed headers allowed. Credentials supported. Max age 1 hour. Does not send wildcard.
We need to use this:
Configures use of wildcard (
*) origin in responses when appropriate.If
send_wildcardis set and the allowed_origins parameter isAll, a wildcardAccess-Control-Allow-Originresponse header is sent, rather than the request’sOriginheader.This option CANNOT be used in conjunction with a credential supported configuration. Doing so will result in an error during server startup.
Defaults to disabled.