Redirect HTTP to HTTPS feature with explicit port
Describe the bug Redirect HTTP to HTTPS doesn't use the ports defined in the configuration
To Reproduce Steps to reproduce the behavior:
- Turn on HTTP to HTTPS redirect in Administration > SSL section
- Surf to http://
:3000 - 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):
- OS: Windows 2019, running node server as windows service
- Wiki.js version: 2.1.113
- Database engine: MSSQL 2019
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.
That would be more than enough for my use case.
The current option to redirect to HTTPS from HTTP in the admin SSL settings causes an excessive redirect error that can (only) can be fixed by modifying the settings value directly in the database.