Skipper: Configurable status code for HTTP -> HTTPS redirect

Created on 17 Sep 2018  路  3Comments  路  Source: zalando/skipper

Following on from the discussion here: https://github.com/zalando/skipper/issues/671#issuecomment-421964980

The outcome of the above issue was a change from using 301 as the redirect code to using the more appropriate 308 status code. While this is the more correct code to use for this purpose it is unsupported by Internet Explorer 11 on Windows 7 and Windows 8.1 (IE11 works fine on Windows 10) and only shows the user with a white page and no explanation of why.

I propose that the status code be configurable (within valid values) so developers can decide on which suits their use case most.

For reference:
301 is a permanent redirect but due to historical reason a POST request may be transformed to a GET when redirected so should be used with caution.
307 is for a temporary redirect that should NOT change the request method.
308 is for a permanent redirect that should NOT change the request method. (But as mentioned above has issues with IE11)

Personally I'd like to see it as an Ingress annotation but I can also imagine scenarios where people would like a CLI option (possibly overridden by the annotation).

On a slightly related note I think it's worth mentioning that CloudFlare uses a 308 for their HTTP->HTTPS redirect so I'm unsure as to how many users this will still effect today.

bug

Most helpful comment

799 fixed it, so I close the issue

All 3 comments

796 says that also android has problems with 308 redirects.

We should provide a fix for this.
My question is if this should be configured global, which means skipper flag or per ingress as annotation.
I agree that annotation let鈥檚 developers choose. Any vote for the flag?

flag for default value, annotation for ingress specific override. Also a annotation to enable or disable https redirect per ingress via annotation would be awesome <3

799 fixed it, so I close the issue

Was this page helpful?
0 / 5 - 0 ratings