[{"user_id": 21059, "stars": [], "topic_id": 18931, "date_created": 1302620911.019572, "message": "Is there a way to force all connections to an app through https?", "group_id": 2873, "id": 643776}, {"user_id": 8740, "stars": [{"date_created": 1302644011.14481, "user_id": 9896}], "topic_id": 18931, "date_created": 1302622010.870923, "message": "@dsr You can do it in a custom WSGI or Django middleware; there's nothing on our loadbalancer side that will do it yet, though we are planning that at some point.", "group_id": 2873, "id": 644061}, {"user_id": 21059, "stars": [], "topic_id": 18931, "date_created": 1302626868.1146331, "message": "Gotcha'. Thanks.", "group_id": 2873, "id": 645309}, {"user_id": 1167, "stars": [], "topic_id": 18931, "date_created": 1302626915.981354, "message": "There's a django middleware I stole from @ojiidotch", "group_id": 2873, "id": 645328}, {"user_id": 1167, "stars": [], "topic_id": 18931, "date_created": 1302626925.540097, "message": "from django.shortcuts import redirect\nfrom django.utils.encoding import iri_to_uri\n\nfrom urlparse import urljoin\n\n\nclass HTTPSMiddleware(object):\n def process_request(self, request):\n if not request.is_secure():\n location = request.get_full_path()\n current_uri = 'https://%s%s' % (request.get_host(), request.path)\n location = urljoin(current_uri, location)\n url = iri_to_uri(location)\n return redirect(url, permanent=True)", "group_id": 2873, "id": 645331}, {"user_id": 21059, "stars": [], "topic_id": 18931, "date_created": 1302640948.6401, "message": "I've never messed with middleware before. Do I just save that as a file and reference it in my settings.py?", "group_id": 2873, "id": 650265}, {"user_id": 21059, "stars": [], "topic_id": 18931, "date_created": 1302641979.183944, "message": "That works beautifully on the ep.io server! Blows up the local dev server though...", "group_id": 2873, "id": 650612}, {"user_id": 1167, "stars": [], "topic_id": 18931, "date_created": 1302641424.6622291, "message": "@dsr yes - see http://docs.djangoproject.com/en/dev/topics/http/middleware/#activating-middleware", "group_id": 2873, "id": 650452}, {"user_id": 21059, "stars": [], "topic_id": 18931, "date_created": 1302641476.808877, "message": "Sweet. Thanks.", "group_id": 2873, "id": 650463}, {"user_id": 25736, "stars": [], "topic_id": 18931, "date_created": 1302787611.101043, "message": "another option is to use a decorator: http://djangosnippets.org/snippets/1351/", "group_id": 2873, "id": 684519}, {"user_id": 30480, "stars": [], "topic_id": 18931, "date_created": 1303339884.12784, "message": "To only enable the middleware in production, add something like this to settings_production:\r\nMIDDLEWARE_CLASSES = (\r\n 'YOUR_APP.middleware.HTTPSMiddleware',\r\n) + MIDDLEWARE_CLASSES\r\nThis assumes you're using settings as suggested here: http://www.ep.io/docs/quickstart/django/#turning-debug-off", "group_id": 2873, "id": 762496}, {"user_id": 9896, "stars": [], "topic_id": 18931, "date_created": 1303368419.1137061, "message": "it would be sweet to have an ep.io setting to enforce https on server level imho", "group_id": 2873, "id": 767160}, {"user_id": 8740, "stars": [], "topic_id": 18931, "date_created": 1303381423.091213, "message": "@ojiidotch Yes, yes it would. Rolling into the loadbalancer is hard, though, as we don't want to impact latency.", "group_id": 2873, "id": 768500}, {"user_id": 9896, "stars": [{"date_created": 1303388279.8399129, "user_id": 1167}], "topic_id": 18931, "date_created": 1303382084.339994, "message": "I understand, but i want you to do all the work for me ;-)", "group_id": 2873, "id": 768532}, {"user_id": 21059, "stars": [], "topic_id": 18931, "date_created": 1303487382.6405351, "message": "@johnhensley Yep. I got that sorted. Thanks though.", "group_id": 2873, "id": 782249}, {"user_id": 5029, "stars": [], "topic_id": 18931, "date_created": 1303848860.424825, "message": "The problem seems to be that this file is ignored using .gitignore (we don't want our credentials to land on github ...)", "group_id": 2873, "id": 818372}, {"user_id": 5029, "stars": [], "topic_id": 18931, "date_created": 1303848809.1368909, "message": "While the file is present in the directory from which I upload", "group_id": 2873, "id": 818368}, {"user_id": 5029, "stars": [], "topic_id": 18931, "date_created": 1303848886.143379, "message": "everything goes fine", "group_id": 2873, "id": 818376}, {"user_id": 5029, "stars": [], "topic_id": 18931, "date_created": 1303848735.1720991, "message": "Hello, I think I have found a bug.", "group_id": 2873, "id": 818358}, {"user_id": 5029, "stars": [], "topic_id": 18931, "date_created": 1303848790.6897759, "message": "I have installed the django-development dashboard on ep.io, but it fails, and in the log, it shows : missing file trac-creds.txt", "group_id": 2873, "id": 818366}, {"user_id": 5029, "stars": [], "topic_id": 18931, "date_created": 1303848879.3934979, "message": "when I remove .gitignore before doing epio upload", "group_id": 2873, "id": 818374}, {"user_id": 7, "stars": [], "topic_id": 18931, "date_created": 1303850460.0721431, "message": "probably should create a seperate thread for this, but yes ep.io ignores files that are ignored yb the repository (if you use git push, not sure how it works if you use the epio client)", "group_id": 2873, "id": 818633}, {"user_id": 5029, "stars": [], "topic_id": 18931, "date_created": 1303851610.9290149, "message": "Oops, I did not notice I was in a thread called Force https", "group_id": 2873, "id": 818815}, {"user_id": 5029, "stars": [], "topic_id": 18931, "date_created": 1303851266.429107, "message": "BTW, I slightly enhanced (I hope) the Django dev dashboard. You can see the result here : http://sparkboard.ep.io/", "group_id": 2873, "id": 818754}, {"user_id": 5029, "stars": [], "topic_id": 18931, "date_created": 1303851224.0788729, "message": "Ok, I expected this to be known, but you never know.", "group_id": 2873, "id": 818751}]