OnFinality
New RPC users get 35% off their first monthView the offer
Infura
Infura1 min read

Infura RPC on Reddit: Browser Keys and Fallbacks

An independent guide to browser-facing RPCs, CORS, credential exposure, and safe read-only fallback checks.

The Reddit thread discusses using Infura or Alchemy as a fallback for a public RPC. A key sent from the browser can be copied. Keep secrets server-side and test a read-only request against both endpoints before enabling failover.

Read the public RPC fallback discussion

Answer upfront: protect what the browser can see

Independent editorial note: This is not official Infura, MetaMask, or Alchemy guidance. A browser cannot keep a credential embedded in its code secret. Use CORS to restrict browser origins, not to conceal a key; keep sensitive credentials off the client. For the official Infura dashboard, use Infura’s own account surface rather than treating this article as account guidance.

Read the thread as an anecdote

The r/ethdev discussion is a developer conversation about browser exposure and considering Infura or Alchemy as a fallback. It can surface practical concerns, but it is not provider documentation, a security audit, or proof that one setup fits every app.

CORS is not a secret

Infura’s CORS guidance concerns cross-origin browser requests. CORS can limit which origins may call an endpoint; it does not erase a credential from shipped JavaScript or make a public endpoint private. If the browser calls directly, assume visible request details can be copied.

Test the fallback safely

Before relying on an alternate endpoint, compare it with the primary using only read-only calls.

  • Call eth_chainId and eth_blockNumber on both endpoints; confirm the expected network and usable responses.
  • Repeat with another non-mutating read if needed. Do not broadcast signed transactions or expose private keys during testing.
  • If results differ, investigate network, lag, or provider-specific behavior before treating the alternate as a fallback.

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started