Skip to content

Conversation

@in-voker
Copy link

Replace https.Agent with undici's Agent for handling self-signed certificates.

Hello and thank you for wanting to contribute to the MagicMirror² project!

Please make sure that you have followed these 3 rules before submitting your Pull Request:

  1. Base your pull requests against the develop branch.
  2. Include these infos in the description:
  • Does the pull request solve a related issue?
    no
  • If so, can you reference the issue like this Fixes #<issue_number>?
  • What does the pull request accomplish? Use a list if needed.
    allow the selfSignedCert: true flag in calenders array to work
  • If it includes major visual changes please add screenshots.
  1. Please run node --run lint:prettier before submitting so that
    style issues are fixed.

Note: Sometimes the development moves very fast. It is highly
recommended that you update your branch of develop before creating a
pull request to send us your changes. This makes everyone's lives
easier (including yours) and helps us out on the development team.

Thanks again and have a nice day!

Replace https.Agent with undici's Agent for handling self-signed certificates.
@KristjanESPERANTO
Copy link
Collaborator

Thanks for addressing this! 🙂 I think your approach using undici's Agent with the dispatcher option is the right way to go 👍

Please handle the linter issues. And optinal but nice to have: Could you add a test case verifying that self-signed certificates work correctly with the new implementation?

@khassel
Copy link
Collaborator

khassel commented Jan 16, 2026

@KristjanESPERANTO When I search for node:https in the project, I get two more hits. Shouldn't that be changed as well?

@KristjanESPERANTO
Copy link
Collaborator

KristjanESPERANTO commented Jan 17, 2026

When I search for node:https in the project, I get two more hits. Shouldn't that be changed as well?

I had a look. The other two uses should remain unchanged:

  1. js/server.js: Creates an HTTPS server (receives connections) - this is unrelated to undici. https.Server is the correct API for creating servers.

  2. clientonly/index.js: Uses the old callback-based https.get() API - not using fetch(). We should refactor this on occasion, but that is unrelated to this PR.

@KristjanESPERANTO KristjanESPERANTO merged commit 23f0290 into MagicMirrorOrg:develop Jan 17, 2026
9 checks passed
@KristjanESPERANTO
Copy link
Collaborator

@in-voker Thanks again for this improvement! It will be in the next release 🙂

@sdetweil
Copy link
Collaborator

There are other modules that need the same fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants