Skip to content

Conversation

mohanad-80
Copy link

Description:
This PR adds HTTPS support to the API server plugin, allowing users to enable HTTPS and provide custom certificate and private key files for secure API access.

Key changes:

  • Added useHttps, certPath, and keyPath fields to the API server config.
  • Updated the plugin menu to include a submenu for HTTPS settings, allowing users to:
    • Enable/disable HTTPS.
    • Select certificate and private key files via file dialogs.
  • Updated backend logic to start an HTTPS server when enabled, using the provided certificate and key.
  • Ensured the server restarts automatically when any relevant config changes (hostname, port, useHttps, certPath, keyPath).
  • Added i18n strings for the new menu items and dialogs.

Why:
This enables secure remote control and API access over HTTPS, addressing feature request #3647.

Testing:

  • Tested HTTP and HTTPS modes on Windows.
  • Verified that changing certificate/key paths and toggling HTTPS restarts the server as expected.
  • Confirmed that WebSocket routes work with HTTPS.

closes #3647

- Add useHttps, certPath, and keyPath fields to APIServerConfig interface and default config.
- These fields allow toggling HTTPS and specifying certificate and key file paths for the API server.
- Add a submenu for HTTPS settings in the API server plugin menu.
- Allow users to enable HTTPS and select certificate and key files via file dialogs.
- Fetch latest config before updating cert/key paths to avoid overwriting values.
- Add labels and dialog titles for HTTPS submenu, certificate, and key selection in the API server plugin.
- Update BackendType to include new HTTPS config fields.
- Change run method to accept full APIServerConfig object.
- Update backend to start an HTTPS server when enabled in config, using provided cert and key paths.
- Ensure server restarts on any relevant config change (hostname, port, useHttps, certPath, keyPath).
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.

HTTPS Support & Custom Certificates
1 participant