Posts

Protecting API keys used in browser front-end apps: Chat with Gemini

Given below are extracts from a recent chat with Gemini. The context is a Blogger page with Javascript code that makes Blogger v3.0 API calls which need a Google API key. I had introduced restrictions on the key like websites it can be used on and that it is enabled only for Blogger API. Me: While with above restritions the API key is less exposed to misuse, I am still quite uneasy about having the API key so easily accessible. In this context, I am curious whether if we convert this into a React project and use the API key as an environment variable, will that prevent the API key from getting exposed to the user? Gem:  You've hit upon a critical distinction in web development security! While using environment variables in a React project is a great practice for managing API keys during development and deployment, it generally does not prevent the API key from being exposed to the end-user's browser if the code runs entirely on the client-side. Let's break this down: 1. En...

Using two monitors for development: Wireless Display, USB to HDMI adapter, H96Max Android device etc.

Last updated on 28 Jun 2025 Quick-Info Using DML as extended monitor to DPC with Wireless Display My Windows 10 Dell Mini Laptop (DML) can be used as an extended monitor to my Windows 11 Desktop PC (DPC) using Wireless Display. DML can use either its 11.6 in. internal monitor or my 15.4 in external monitor using HDMI cable, as an extended monitor to DPC. Wireless Display optional feature has been set up on both DPC and DML. DPC and DML can be connected using Mobile Hotspot of Samsung phone. On DML, Settings -> Project to this PC -> Launch connect app. On DPC Win + K -> Choose DML. Now DML will act as extended monitor to DPC. Performance seems to be good enough even for Youtube video streaming on DML extended monitor. A performance improvement possibilties is:  Better WiFi adapters at least on DPC if not both DPC and DML. Wired LAN setup using old Netgear router did not help as that wired network was not used for Wireless Display. Other options for extended monitor USB 3.0 ...