Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support SSL on non-standard ports #373

Open
ankitrgadiya opened this issue Aug 22, 2020 · 1 comment
Open

Support SSL on non-standard ports #373

ankitrgadiya opened this issue Aug 22, 2020 · 1 comment

Comments

@ankitrgadiya
Copy link

Currently, WriteFreely only supports SSL on 443 port. The server checks if the port is 443 and only then it enables the SSL Relevant code: https://github.com/writeas/writefreely/blob/dfa14c9c92937e9806327f97847e4b9440f3b7be/config/config.go#L214-L216

I would like WriteFreely to support SSL on non-standard (ports out of 1-1000 range). This is because the 1-1000 port range requires root privilege to be bound, thus preventing Docker installations to use non-root users. I propose a new configuration variable for SSL and modify the IsSecureStandalone function to check that variable. Then, the supplied port won't matter. It should be a small change but does modify the configuration format.

I'd be happy to take this up 😀.

@ankitrgadiya
Copy link
Author

It appears that when SSL is enabled, WriteFreely also binds to port 80 and create a redirect. That also is definitely a problem for non-privileged containers. Open for suggestions on how to take care of that.

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

No branches or pull requests

2 participants