![](/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.