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

Feature suggestion - Option to redirect http to https when protocol = https #1720

Closed
MCF opened this issue May 13, 2017 · 0 comments · Fixed by #1928
Closed

Feature suggestion - Option to redirect http to https when protocol = https #1720

MCF opened this issue May 13, 2017 · 0 comments · Fixed by #1928
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Milestone

Comments

@MCF
Copy link
Contributor

MCF commented May 13, 2017

I'd like to redirect users who arrive on port 80 to port 443. I am running a small gitea instance using https without an additional webserver component (e.g. nginx), and it seems it is not possible to do this with gitea alone. I like the small lightweight gitea server approach and do not want to drop in another web server. Would it be possible to add an option to have the gitea web server do the redirection?

Perhaps the option would be something like:

[server]
PROTOCOL = https
REDIRECT_HTTP_TO_HTTPS = true

And the new option is only used if PROTOCOL = https.

I'd be happy to prepare a pull request for the feature if the core devs think it would be useful. I would probably adapt this example for the actual redirection:

https://gist.github.com/d-schmidt/587ceec34ce1334a5e60

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label May 14, 2017
@lunny lunny added this to the 1.x.x milestone May 14, 2017
@lafriks lafriks modified the milestones: 1.x.x, 1.4.0 Dec 25, 2017
@lafriks lafriks added type/feature Completely new functionality. Can only be merged if feature freeze is not active. and removed type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Dec 25, 2017
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants