Skip to content

Commit 9a6563c

Browse files
committed
chore: Drop Vite env vars
1 parent 8fbd983 commit 9a6563c

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Find these components in the wild, including what we're learning through public
3333

3434
Different features rely on different APIs - namely from Ordnance Survey and Mapbox.
3535

36-
You can set keys directly as props (eg `osApiKey`) on the applicable web components or via environment variables (eg `VITE_APP_OS_API_KEY`) for local development.
36+
You can set keys directly as props (eg `osApiKey`) on the applicable web components or [use a proxy](https://github.com/theopensystemslab/map/blob/main/docs/how-to-use-a-proxy.md) to mask these secrets.
3737

3838
Address autocomplete utilises the OS Places API.
3939

src/components/address-autocomplete/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ export class AddressAutocomplete extends LitElement {
3232
initialAddress = "";
3333

3434
@property({ type: String })
35-
osApiKey = import.meta.env.VITE_APP_OS_API_KEY || "";
35+
osApiKey = "";
3636

3737
/**
3838
* @deprecated - please set singular `osApiKey`
3939
*/
4040
@property({ type: String })
41-
osPlacesApiKey = import.meta.env.VITE_APP_OS_PLACES_API_KEY || "";
41+
osPlacesApiKey = "";
4242

4343
@property({ type: String })
4444
osProxyEndpoint = "";

src/components/my-map/index.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -200,19 +200,19 @@ export class MyMap extends LitElement {
200200
disableVectorTiles = false;
201201

202202
@property({ type: String })
203-
osApiKey = import.meta.env.VITE_APP_OS_API_KEY || "";
203+
osApiKey = "";
204204

205205
/**
206206
* @deprecated - please set singular `osApiKey`
207207
*/
208208
@property({ type: String })
209-
osVectorTilesApiKey = import.meta.env.VITE_APP_OS_VECTOR_TILES_API_KEY || "";
209+
osVectorTilesApiKey = "";
210210

211211
/**
212212
* @deprecated - please set singular `osApiKey`
213213
*/
214214
@property({ type: String })
215-
osFeaturesApiKey = import.meta.env.VITE_APP_OS_FEATURES_API_KEY || "";
215+
osFeaturesApiKey = "";
216216

217217
@property({ type: String })
218218
osCopyright =
@@ -228,7 +228,7 @@ export class MyMap extends LitElement {
228228
applySatelliteStyle = false;
229229

230230
@property({ type: String })
231-
mapboxAccessToken = import.meta.env.VITE_APP_MAPBOX_ACCESS_TOKEN || "";
231+
mapboxAccessToken = "";
232232

233233
@property({ type: Boolean })
234234
hideResetControl = false;

0 commit comments

Comments
 (0)