-
Do I need to have a backend proxy for API URL? const client = createAlchemySmartAccountClient({
chain: polygonAmoy,
rpcUrl: "/api/rpc",
}); or it is okay to use the original URL in the frontend? const client = createAlchemySmartAccountClient({
chain: polygonAmoy,
rpcUrl: "https://polygon-amoy.g.alchemy.com/v2/xxxx",
}); Having a proxy as you know would increase our egress bill and we would like to learn if it is worth it. Thanks for reading. |
Beta Was this translation helpful? Give feedback.
Answered by
moldy530
May 2, 2024
Replies: 1 comment 1 reply
-
That api key should be treated as a secret that you don't want to expose on the frontend, we highly recommend the proxy. otherwise, if someone gets your key then they can use it to make RPC requests on your behalf (increasing your alchemy bill) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
moldy530
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That api key should be treated as a secret that you don't want to expose on the frontend, we highly recommend the proxy. otherwise, if someone gets your key then they can use it to make RPC requests on your behalf (increasing your alchemy bill)