且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何开源使用 API 密钥的应用程序

更新时间:2023-02-16 16:35:18

不知道您使用的是什么语言,但例如在 C/C++ 中,您会添加一个包含 API 密钥的包含文件,然后将其保留在源代码控制之外,添加一个带有显式伪造 API 密钥的伪造文件.大多数语言都有一种或另一种方式来包含文件.

Don't know what language you are using, but for example in C/C++ you'd add a include file with the API keys, and then leave it out of source control, instead add a bogus file with explicitly fake API keys. Most languages have one or the other way to include files.