requarks / wiki

Wiki.js | A modern and powerful wiki app built on Node.js
https://js.wiki
GNU Affero General Public License v3.0
24.25k stars 2.68k forks source link

Redirect HTTP to HTTPS feature with explicit port #1537

Open vincent-polite opened 4 years ago

vincent-polite commented 4 years ago

Describe the bug Redirect HTTP to HTTPS doesn't use the ports defined in the configuration

To Reproduce Steps to reproduce the behavior:

  1. Turn on HTTP to HTTPS redirect in Administration > SSL section
  2. Surf to http://:3000
  3. Redirect goes to https:// without a specific port.

Expected behavior In my use case, I'm already hosting IIS at ports 80 and 443 and running wikijs as a standalone on ports 3000 and 3443. I thought this feature would map my requests to :3000 to :3443 and change the protocol to https.

Host Info (please complete the following information):

NGPixel commented 4 years ago

The default ports (3000 and 3443) are meant to be remapped to 80 and 443 at some point in your network (either at docker level, reverse-proxy or firewall) as it's not ideal to ask your users to add :3000 / :3443 when loading your wiki.

However an option could be added to add the HTTPS port to the redirect URL, for this specific scenario.

vincent-polite commented 4 years ago

That would be more than enough for my use case.