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

fix(nuxi,schema): support devServer.https: true #20498

Merged
merged 1 commit into from Apr 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/nuxi/src/commands/dev.ts
Expand Up @@ -62,8 +62,8 @@ export default defineNuxtCommand({
hostname: args.host || args.h || process.env.NUXT_HOST || config.devServer.host,
https: (args.https !== false && (args.https || config.devServer.https))
? {
cert: args['ssl-cert'] || (config.devServer.https && config.devServer.https.cert) || undefined,
key: args['ssl-key'] || (config.devServer.https && config.devServer.https.key) || undefined
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
}
: false
})
Expand Down
2 changes: 1 addition & 1 deletion packages/schema/src/config/dev.ts
Expand Up @@ -18,7 +18,7 @@ export default defineUntypedSchema({
* ```
*
*
* @type {false | { key: string; cert: string }}
* @type {boolean | { key: string; cert: string }}
*
*/
https: false,
Copy link
Member

Choose a reason for hiding this comment

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

This couldn’t be true after normalization. Please double check. Self generated cert is available for nuxt.options https when enabled

Copy link
Member Author

Choose a reason for hiding this comment

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

Would you explain more? What do you mean?

Expand Down