From b0daaa8cbbdc6e180163363a8d8de766f467d6f9 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 3 Jul 2023 12:21:59 +0100 Subject: [PATCH] fix(nuxi): respect nitro ssl cert/key variables (#21912) --- packages/nuxi/src/commands/dev.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/nuxi/src/commands/dev.ts b/packages/nuxi/src/commands/dev.ts index 6da840d29b..50e10e99ae 100644 --- a/packages/nuxi/src/commands/dev.ts +++ b/packages/nuxi/src/commands/dev.ts @@ -59,12 +59,12 @@ export default defineNuxtCommand({ showURL: false, clipboard: args.clipboard, open: args.open || args.o, - port: args.port || args.p || process.env.NUXT_PORT || config.devServer.port, - hostname: args.host || args.h || process.env.NUXT_HOST || config.devServer.host, + port: args.port || args.p || process.env.NUXT_PORT || process.env.NITRO_PORT || config.devServer.port, + hostname: args.host || args.h || process.env.NUXT_HOST || process.env.NITRO_HOST || config.devServer.host, https: (args.https !== false && (args.https || config.devServer.https)) ? { - cert: args['ssl-cert'] || (typeof config.devServer.https !== 'boolean' && config.devServer.https.cert) || undefined, - key: args['ssl-key'] || (typeof config.devServer.https !== 'boolean' && config.devServer.https.key) || undefined + cert: args['ssl-cert'] || process.env.NUXT_SSL_CERT || process.env.NITRO_SSL_CERT || (typeof config.devServer.https !== 'boolean' && config.devServer.https.cert) || undefined, + key: args['ssl-key'] || process.env.NUXT_SSL_KEY || process.env.NITRO_SSL_KEY || (typeof config.devServer.https !== 'boolean' && config.devServer.https.key) || undefined } : false })