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.