Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! fix(@angular/build): simplify SSL handling for with SSR
  • Loading branch information
alan-agius4 committed Nov 7, 2025
commit 31a40e2d3d8beaadd0fdf04e6eac155993478ee0
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@ export function createAngularServerSideSSLPlugin(): Plugin {
async configureServer({ config, httpServer }) {
const {
ssr,
server: { https: cert },
server: { https },
} = config;

if (!ssr || !cert) {
if (!ssr || !https?.cert) {
return;
}

// TODO(alanagius): Replace `undici` with `tls.setDefaultCACertificates` once we only support Node.js 22.18.0+ and 24.5.0+.
// See: https://nodejs.org/api/tls.html#tlssetdefaultcacertificatescerts
const { getGlobalDispatcher, setGlobalDispatcher, Agent } = await import('undici');
const originalDispatcher = getGlobalDispatcher();
const { cert } = https;
const certificates = Array.isArray(cert) ? cert : [cert];

setGlobalDispatcher(
Expand Down