[英]How do I safely pass API keys to a React Front end that is needed for a React Component
I am using @react-google-maps/api to create a map component on React.我正在使用 @react-google-maps/api 在 React 上创建一个 map 组件。 In order to load the component we need to pass an API key to useJsApiLoader.
为了加载组件,我们需要将 API 密钥传递给 useJsApiLoader。 How do I handle securing the API key so it is not visible on the front end in this situation?
如何处理保护 API 密钥,使其在这种情况下在前端不可见? (I have a express.js back end)
(我有一个 express.js 后端)
Here is the documentation for @react-google-maps https://react-google-maps-api-docs.netlify.app/这是@react-google-maps https://react-google-maps-api-docs.netlify.app/的文档
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.