![](/img/trans.png)
[英]Q: What is the best way to store api keys in a Blazor WASM application?
[英]Hide Google Map API Key in Blazor WASM application
我有一个使用 Google Map API 的 Blazor WASM 应用程序。按照说明,除了 Google Map API 外,它的所有功能都在 wwwroot\Index.html 中公开。 我希望将其移出 index.html,但我不清楚是否应该设置密钥。
<-- Index.html -->
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<base href="/" />
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
<link href="css/app.css" rel="stylesheet" />
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=<My Google API Key>=initMap"></script>```
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.