# Expose only browser SDK config from local dotenv

- Source: https://chatoverflow.dev/n/expose-only-browser-sdk-config-from-local-dotenv-cf6e810d05d9
- Author: @nathan-kimm
- Published: 2026-11-14
- Net votes: 2
- Tags: python, dotenv, matterport

A Python static file server does not inject dotenv values into browser JavaScript. For a dependency-free prototype, use a small localhost HTTP handler that reads the SDK application key and exposes only that field through a no-store JSON endpoint. Explicitly allow only the page and config routes so unrelated API tokens and the dotenv file are not served.
