Bug 1114458 - Forced HTTPS Redirect by DIY Cartridge
Summary: Forced HTTPS Redirect by DIY Cartridge
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-30 06:42 UTC by Ryan Hill
Modified: 2015-05-14 23:36 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-02 13:38:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
dns zone file (1.68 KB, text/plain)
2014-06-30 06:42 UTC, Ryan Hill
no flags Details

Description Ryan Hill 2014-06-30 06:42:28 UTC
Created attachment 913259 [details]
dns zone file

Description of problem:
The Do-It-Yourself (0.1) cartridge seems to force CDN clients to https when attempting to access an http-only application via CNAME reference

Version-Release number of selected component (if applicable):
0.1

How reproducible:
Attempt to access http://www.zndx.org

Steps to Reproduce:
1. request http://www.zndx.org
2. client redirects to https://www.zndx.org/app
3.

Actual results:
$ curl -I http://www.zndx.org
HTTP/1.1 302 Found
Server: cloudflare-nginx
Date: Mon, 30 Jun 2014 06:32:12 GMT
Content-Type: text/html; charset=iso-8859-1
Connection: keep-alive
Set-Cookie: __cfduid=d5ec29aede2e038e743898b2c958914db1404109932178; expires=Mon, 23-Dec-2019 23:50:00 GMT; path=/; domain=.zndx.org; HttpOnly
Location: https://www.zndx.org/app
CF-RAY: 142853441f8a0d67-LAX 


Expected results:
$ curl -I http://rch-zndx.rhcloud.com
HTTP/1.1 200 OK
Date: Mon, 30 Jun 2014 06:34:03 GMT
Server: nginx/1.6.0
Content-Type: text/html; charset=utf-8
Content-Length: 29
Last-Modified: Mon, 30 Jun 2014 05:15:33 GMT
ETag: "53b0f275-1d"
Accept-Ranges: none
Vary: Accept-Encoding


Additional info:
Full configuration and application**:
https://github.com/rch/flask-openshift

**requires postgresql cart

Comment 1 Ben Parees 2014-06-30 21:04:04 UTC
guessing this is in the node proxy logic...

Comment 2 Ryan Hill 2014-06-30 21:25:21 UTC
I've switched from a DIY cart to a stock Python27 cart with no changes. New openshift url:

http://main-zndx.rhcloud.com/

Same problem.

Comment 3 Ryan Hill 2014-07-01 00:37:40 UTC
CloudFlare confirms the problem as being on the OpenShift side, and has has supplied information to that effect. Thanks very much for taking a look.

Comment 4 Ryan Hill 2014-07-02 06:43:34 UTC
I was poking around at this and realized I'd neglected to add an alias for the app, and doing so resolved my error. I suppose I could claim that the error could be more straightforward, but I could have simply spent more time looking at the documentation too. 

Works for me, but someone might still want to look into the redirect behavior (using different domains).

Comment 5 Jakub Hadvig 2014-07-02 13:02:43 UTC
Ryan is there actually any issue, or did adding the alias resolved it ?

Comment 6 Ryan Hill 2014-07-02 13:38:25 UTC
I would say adding the alias resolved it, and close this. There could
be an enhancement, but I could open that separately.

Comment 7 Jakub Hadvig 2014-07-03 08:58:52 UTC
Ryan, yes please, do that.
Thanks :)


Note You need to log in before you can comment on or make changes to this bug.