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

read env vars from next.config.js #3128

Merged
merged 1 commit into from
Jan 17, 2023
Merged

Conversation

ForsakenHarmony
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented Dec 22, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
examples-basic-web 🔄 Building (Inspect) Jan 17, 2023 at 3:10PM (UTC)
examples-kitchensink-blog 🔄 Building (Inspect) Jan 17, 2023 at 3:10PM (UTC)
8 Ignored Deployments
Name Status Preview Comments Updated
examples-cra-web ⬜️ Ignored (Inspect) Jan 17, 2023 at 3:10PM (UTC)
examples-designsystem-docs ⬜️ Ignored (Inspect) Jan 17, 2023 at 3:10PM (UTC)
examples-native-web ⬜️ Ignored (Inspect) Jan 17, 2023 at 3:10PM (UTC)
examples-nonmonorepo ⬜️ Ignored (Inspect) Jan 17, 2023 at 3:10PM (UTC)
examples-svelte-web ⬜️ Ignored (Inspect) Jan 17, 2023 at 3:10PM (UTC)
examples-tailwind-web ⬜️ Ignored (Inspect) Jan 17, 2023 at 3:10PM (UTC)
turbo-site ⬜️ Ignored (Inspect) Visit Preview Jan 17, 2023 at 3:10PM (UTC)
turbo-vite-web ⬜️ Ignored (Inspect) Jan 17, 2023 at 3:10PM (UTC)

@ForsakenHarmony
Copy link
Contributor Author

ForsakenHarmony commented Dec 22, 2022

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

Comment on lines 70 to 72
for (var, val) in next_config.env.iter() {
map.insert(var.clone(), val.clone());
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is happening post encoding (via the EmbeddableProcessEnvVc), which means a { env: "alert('XSS')" } injects live code and will actually alert the user.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, fixed

@ForsakenHarmony ForsakenHarmony changed the base branch from hrmny/web-352-nextconfigjs-validation to main January 17, 2023 14:36
@github-actions
Copy link
Contributor

github-actions bot commented Jan 17, 2023

🟢 CI successful 🟢

Thanks

@github-actions
Copy link
Contributor

Benchmark for cfe5756

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 8369.73µs ± 34.07µs 8367.72µs ± 53.92µs -0.02%
bench_hmr_to_commit/Turbopack RCC/1000 modules 8509.07µs ± 77.78µs 8588.20µs ± 91.29µs +0.93%
bench_hmr_to_commit/Turbopack RSC/1000 modules 480.05ms ± 1.70ms 489.26ms ± 4.10ms +1.92%
bench_hmr_to_commit/Turbopack SSR/1000 modules 8489.22µs ± 54.15µs 8506.07µs ± 62.55µs +0.20%
bench_hmr_to_eval/Turbopack CSR/1000 modules 7402.41µs ± 76.83µs 7442.93µs ± 29.64µs +0.55%
bench_hmr_to_eval/Turbopack RCC/1000 modules 7502.41µs ± 78.60µs 7516.53µs ± 45.22µs +0.19%
bench_hmr_to_eval/Turbopack SSR/1000 modules 7421.76µs ± 54.40µs 7540.77µs ± 63.93µs +1.60%
bench_hydration/Turbopack RCC/1000 modules 3342.65ms ± 14.39ms 3327.96ms ± 10.60ms -0.44%
bench_hydration/Turbopack RSC/1000 modules 2839.07ms ± 10.32ms 2823.88ms ± 8.88ms -0.53%
bench_hydration/Turbopack SSR/1000 modules 2643.51ms ± 11.05ms 2646.19ms ± 6.91ms +0.10%
bench_startup/Turbopack CSR/1000 modules 1640.90ms ± 6.79ms 1621.01ms ± 4.23ms -1.21%
bench_startup/Turbopack RCC/1000 modules 2503.03ms ± 8.06ms 2488.98ms ± 6.68ms -0.56%
bench_startup/Turbopack RSC/1000 modules 2388.37ms ± 9.30ms 2411.25ms ± 13.67ms +0.96%
bench_startup/Turbopack SSR/1000 modules 2063.23ms ± 8.44ms 2052.33ms ± 7.25ms -0.53%

@ForsakenHarmony ForsakenHarmony merged commit 1194330 into main Jan 17, 2023
@ForsakenHarmony ForsakenHarmony deleted the hrmny/web-298-nextconfig-env branch January 17, 2023 17:51
NicholasLYang pushed a commit to NicholasLYang/turbo that referenced this pull request Jan 18, 2023
jridgewell pushed a commit to vercel/next.js that referenced this pull request Mar 10, 2023
sokra pushed a commit to vercel/next.js that referenced this pull request Mar 13, 2023
ForsakenHarmony added a commit to vercel/next.js that referenced this pull request Jul 25, 2024
ForsakenHarmony added a commit to vercel/next.js that referenced this pull request Jul 29, 2024
ForsakenHarmony added a commit to vercel/next.js that referenced this pull request Aug 1, 2024
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.

3 participants