فهرست منبع

Extract google API key to new env var

Kirk Trombley 4 سال پیش
والد
کامیت
d5779a2fe5
2فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 1 0
      client/.env
  2. 1 1
      client/public/index.html

+ 1 - 0
client/.env

@@ -1,2 +1,3 @@
 REACT_APP_API_BASE=https://hiram.services/terrassumptions/api
 REACT_APP_MONITOR_STORE=false
+REACT_APP_GOOGLE_API_KEY=AIzaSyCDtEWf192OYuMvd2cp8a04DYQo-RU_sXs

+ 1 - 1
client/public/index.html

@@ -12,7 +12,7 @@
     <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
     <title>TerrAssumptions</title>
     <!-- Statically and synchronously load the Google Maps Javascript API -->
-    <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCDtEWf192OYuMvd2cp8a04DYQo-RU_sXs"></script>
+    <script src="https://maps.googleapis.com/maps/api/js?key=%REACT_APP_GOOGLE_API_KEY%"></script>
   </head>
   <body>
     <noscript>You need to enable JavaScript to run this app.</noscript>