Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Ingress - SSL should not redirect by default #871

Closed
ajohnstone opened this issue Apr 30, 2016 · 1 comment · Fixed by #766
Closed

Ingress - SSL should not redirect by default #871

ajohnstone opened this issue Apr 30, 2016 · 1 comment · Fixed by #766

Comments

@ajohnstone
Copy link
Contributor

ajohnstone commented Apr 30, 2016

The nginx.tmpl redirects to https by default, I'm not sure this should be the standard behaviour.

        {{ if $server.SSL }}
        if ($scheme = http) {
            return 301 https://$host$request_uri;
        }
        {{ end }}

All the examples will break for example...

$ curl -v --resolve foo.bar.com:80:54.171.67.92 foo.bar.com/foo
* Added foo.bar.com:80:54.171.67.92 to DNS cache
* Hostname foo.bar.com was found in DNS cache
*   Trying 54.171.67.92...
* Connected to foo.bar.com (54.171.67.92) port 80 (#0)
> GET /foo HTTP/1.1
> Host: foo.bar.com
> User-Agent: curl/7.47.0
> Accept: */*
> 
< HTTP/1.1 301 Moved Permanently
< Server: nginx/1.9.13
< Date: Sat, 30 Apr 2016 06:24:53 GMT
< Content-Type: text/html
< Content-Length: 185
< Connection: keep-alive
< Location: https://foo.bar.com/foo
< 
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.9.11</center>
</body>
</html>
* Connection #0 to host foo.bar.com left intact
@aledbf
Copy link
Contributor

aledbf commented Apr 30, 2016

@ajohnstone this is being fixed in #766 using hsts=false in the configuration Configmap

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants