javascript - How to hide an API key on client side?
问题描述
I know I'm not supposed to put API keys in the client side, but I can't think of a way around it. I am trying to integrate Google Pay on a website, and the payment processor is Paysafe. The Google Pay code is on the client side, and it requires the Paysafe API key (which needs to be kept secret) in the code.
Is it safe to put the API key in a json file on the server, and call that file for the key when it's required? Or is it still going to be exposed to the client?
解决方案
推荐阅读
- spring - POST 请求未从过滤器转发到控制器类
- .htaccess - 将所有外部请求重定向到与服务器 url .htaccess 等效的 prod
- asynchronous - Asio的执行流程是什么?
- c - FILE vs HANDLE - 这两件事有什么区别
- python - Docker Flask - jinja2.exceptions.TemplateNotFound 错误
- python-3.x - Python3 - YAML 未正确在列表中附加值
- javascript - Why is the for loop ending very early?
- rxjs - 延迟无限流的每个值
- docker - 在 Alpine Docker 上安装 Scipy 时准备轮元数据时出错
- sql-server - SQL Server 中的表没有自然键