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

Add basic HTTPS support for dev only #53926

Closed
wants to merge 6 commits into from

Conversation

jd-carroll
Copy link

What?

Add basic HTTPS/TLS support for dev server only.

Why?

For anyone using the Web Crypto API, a secure browser context is required even in dev.

The latest version of Next.js does not support Hot Module Reload if you are using a custom server: #51162

#51162 (comment)

How?

Add a basic --https flag with the option of specifying a cert & key via the command line or environment variable.

NOTE: This only adds support for the Node dev server. It does not add https/tls support for Turbopack

NOTE: This does not address any of the underlying issues associate with #51162, it simply removes a use case for needing a custom server.

@weyert
Copy link

weyert commented Aug 14, 2023

Yes, this would be great to have! Especially, now that dev mode stopped working in recent version of Next.js. Pretty annoying that it won't compile code when you visit a page/path.

One of the main reason to use a custom server and in the past OpenTelemetry but that can be resolved with the instrumentation hook and custom instrumentation.

@HamAndRock
Copy link

#54016 seems like nextjs team started solving this too

@jd-carroll
Copy link
Author

Closing in favor of #54016

@jd-carroll jd-carroll closed this Aug 15, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants