安全使用Google Maps API密钥的最佳做法

Nit*_*ita 5 javascript php api maps

Google建议不要公开API编号。即使他们在大多数工作示例中要求在代码中包含您的API密钥,也足够公平

<script async defer
        src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap">
Run Code Online (Sandbox Code Playgroud)

然后你得到这个建议,在看到:https://support.google.com/googleapi/answer/6310037 - 不要直接在代码中嵌入API密钥!

因此,我的问题是如何安全地嵌入Google Map API密钥,同时使其对其他用户不可见?我使用PHP,JS和MySQL