Explorer not communicating with custom fullnode

This can happen because the browser detects a malformed CORS header from the fullnode, which can be fixed by fixing the fullnode deployment’s CORS configuration.

To check whether this is affecting you, consult the browser console after setting Explorer’s Custom RPC URL. If it contains messages like:

Access to XMLHttpRequest at ‘[your server]’ from origin ‘https://explorer.sui.io/’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: The ‘Access-Control-Allow-Origin’ header contains multiple values ‘*, *’, but only one is allowed

CORS headers are the issue.

11 Likes

Hello there! Way to fix it:

  • be sure that your node and HTTP-server work correctly (your endpoint is available from the outside and for api, sdk. etc);

  • compare your fullnode schema with latest;

  • use your endpoint as HTTP-server for https://explorer.sui.io/ (if it doesn’t work, check previously steps);

  • setup domain, and be sure that CORS is enabled for sui explorer domain.

In my case, I used nginx and my problem was that I enabled CORS from all websites by add_header Access-Control-Allow-Origin * but default CORS was enabled, so I removed add_header and it helped.

But remember CORS is for your security and be sure that you know what you do with it.

12 Likes