-
Notifications
You must be signed in to change notification settings - Fork 2k
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 http to https redirection based on $http_x_forwarded_proto #115
Comments
@cwhenderson20 that sounds good. This behavior is not possible with the existing ConfigMaps settings. |
@pleshakov, great! I'm not familiar with Go, but it looks like the addition should be relatively easy. Should I try to open a PR for this or are you already working on it? |
@cwhenderson20 yes, this can be done relatively easy. For example, this feature is similar -- https://github.com/nginxinc/kubernetes-ingress/pull/108/files -- has a boolean configmap/annotation. It'd be great if you could open a PR. |
Great, I'll try to get it to you this afternoon |
@pleshakov Opened PR #116 |
I am using this ingress controller behind an ELB on AWS and have configured the ELB to do all of the SSL termination. However, since I also want to accept standard HTTP requests, I've opened port 80 on the ELB as well.
This works great except for one detail: I'd like all connections to be over HTTPS and thus need to be able to define (for each ingress resource) a 301 redirect to HTTPS if the request is sent over HTTP.
Looking through the code, I can see that this is the default behavior if SSL termination is configured on the ingress controller itself, but given that my ELB is doing the SSL termination, the connection from the ELB to the ingress controller is always HTTP-only.
Would it be an easy addition to add an annotation/ConfigMap key that would allow this behavior? Something like:
nginx.org/redirect-to-https
that would enable a rule in the conf file such as:...or would this conflict with other configuration options? If this type of behavior is already possible using another combination of annotations or ConfigMap settings, please let me know.
The text was updated successfully, but these errors were encountered: