Skip to content

[Feature] Automatic HTTP to HTTPS redirection #669

@KARMA-UA

Description

@KARMA-UA

Is your feature request related to a problem?

Currently, when SSL is enabled, TorrServer works perfectly on the secure port (e.g., 443). However, if a user enters the domain name in a browser without explicitly typing https://, the browser defaults to an unencrypted HTTP connection (on port 80).

To ensure a secure connection, users currently have to:

  1. Manually type the full https:// address every time.
  2. Or set up external workarounds like Nginx reverse proxies or custom redirect scripts.

Describe the solution you'd like

It would be a great addition to have a built-in option to automatically redirect all incoming HTTP traffic to HTTPS (301 Redirect).

Ideally, when the --ssl flag is active, there could be an optional parameter (or a default behavior) that listens on port 80 and seamlessly moves the user to the secure version of the site.

Why this is useful:

  • Security: Ensures that all users always use an encrypted connection by default.
  • Simplicity: Keeps the "single binary" philosophy of TorrServer without requiring extra software (like Nginx or Python scripts) for a simple redirect.
  • Better UX: Makes the web interface more professional and easier to access for end-users.

Thank you for the amazing work on TorrServer!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions