You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support https over subdomains on a local development server out of the box
Non-Goals
Support complex domain certificates that a user can create and import using additional configuration
Background
Consider the Platform Starter Kit as an example, but any multi-tenant or application that serves content over multiple subdomains on a single instance would benefit from out of the box support for https in local development. That requires generating certificates to support subdomains.
Proposal
Since the --experimental-https is still experimental, I think this is a good opportunity to discuss what an API would look like for supporting wildcard subdomains. These are the existing flags from the API Reference:
--experimental-https Starts the server with HTTPS and generates a self-signed certificate.
--experimental-https-key, <path> Path to a HTTPS key file.
--experimental-https-cert, <path> Path to a HTTPS certificate file.
--experimental-https-ca, <path> Path to a HTTPS certificate authority file.
I created a repo with a new flag --experimental-https-wildcard and updated API of the createSelfSignedCertificate function.
Run as: next dev --experimental-https --experimental-https-wildcard
Alternatively I thought about allowing the existing flag to accept a parameter --experimental-https wildcard or keeping the existing flag simple and enforcing the details through the next.config.js.
Overall I think this feature would benefit from having this functionality.
Thanks
PS. Realize I may be duplicating #33768 which generally discusses https support.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Non-Goals
Background
Consider the Platform Starter Kit as an example, but any multi-tenant or application that serves content over multiple subdomains on a single instance would benefit from out of the box support for https in local development. That requires generating certificates to support subdomains.
Proposal
Since the
--experimental-https
is still experimental, I think this is a good opportunity to discuss what an API would look like for supporting wildcard subdomains. These are the existing flags from the API Reference:I created a repo with a new flag
--experimental-https-wildcard
and updated API of thecreateSelfSignedCertificate
function.Run as:
next dev --experimental-https --experimental-https-wildcard
https://github.com/CopyJosh/next-dev-create-wildcard-certificates/tree/experimental-https-wildcard-flag
Alternatively I thought about allowing the existing flag to accept a parameter
--experimental-https wildcard
or keeping the existing flag simple and enforcing the details through thenext.config.js
.Overall I think this feature would benefit from having this functionality.
Thanks
PS. Realize I may be duplicating #33768 which generally discusses https support.
Beta Was this translation helpful? Give feedback.
All reactions