Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: expose only a set of env variables #904

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

med8bra
Copy link

@med8bra med8bra commented Mar 21, 2025

This is a fix to remove the use of DefinePlugin with process.env as it exposes all env variables in your bundle.
If you inspect https://search.nixos.org/bundle.js you will notice all CI env vars are bundled with your app.

      n.Main.init({
        flags: {
          elasticsearchMappingSchemaVersion: parseInt("42"),
          elasticsearchUrl:
            {
              NODE_ENV: "production",
              SHELL:
                "/nix/store/phqa311klldrcbwid1i22dwnpfc9dnma-bash-5.1-p8/bin/bash",
              npm_config_timing: "",
              npm_config_access: "",
	      ... 
	    }.ELASTICSEARCH_URL || "/backend",

@med8bra med8bra force-pushed the fix/remove-procces-env-def branch from a49acec to d0e4c4b Compare March 21, 2025 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant