Hiding private details from open source projects

后端 未结 4 2170
挽巷
挽巷 2021-02-11 07:22

I have a .net github project that is basically a wrapper around a web API. In the test project, I am calling to the API using an API key. I need to keep this key private, how do

4条回答
  •  北海茫月
    2021-02-11 07:59

    Perhaps you can store the key outside of the Config.cs file and load it at run time.

    Bonus, other people using your code won't have to recompile the project to change to their API key.

提交回复
热议问题