Ticket #5445: 0001-Replace-HTTP-with-HTTPS-links.patch

File 0001-Replace-HTTP-with-HTTPS-links.patch, 2.2 KB (added by karsten, 8 years ago)
  • js/collections/results.js

    From 1a9c0ae7d2f772f180eb5eb175ad02895a137ad1 Mon Sep 17 00:00:00 2001
    From: Karsten Loesing <karsten.loesing@gmx.net>
    Date: Thu, 22 Mar 2012 08:54:48 +0100
    Subject: [PATCH] Replace HTTP with HTTPS links.
    
    After moving Onionoo to a host that provides HTTPS, or rather a host that
    enforces HTTPS by redirecting HTTP requests to HTTPS, Atlas has a problem:
    it doesn't handle HTTP 302 redirects correctly.  It simply says "Backend
    error!"  The problem goes away with HTTPS Everywhere enabled, because then
    the client rewrites the HTTP link to HTTPS.  But without HTTPS Everywhere,
    the server sends a 302 and the client gets confused.
    
    Fixes #5445.
    ---
     js/collections/results.js |    2 +-
     js/models/graph.js        |    2 +-
     js/models/relay.js        |    2 +-
     3 files changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/js/collections/results.js b/js/collections/results.js
    index ad71cfc..c18a070 100644
    a b define([ 
    77], function($, _, Backbone, relayModel){
    88        var resultsCollection = Backbone.Collection.extend({
    99                model: relayModel,
    10                 baseurl: 'http://onionoo.torproject.org/summary/search/',
     10                baseurl: 'https://onionoo.torproject.org/summary/search/',
    1111                url: '',
    1212                lookup: function(options) {
    1313            var success = options.success;
  • js/models/graph.js

    diff --git a/js/models/graph.js b/js/models/graph.js
    index 4d1f8ce..ee86348 100644
    a b define([ 
    66  'backbone'
    77], function($, _, Backbone){
    88    var graphModel = Backbone.Model.extend({
    9         baseurl: 'http://onionoo.torproject.org',
     9        baseurl: 'https://onionoo.torproject.org',
    1010        initialize: function() {
    1111        this.set({
    1212            days: {write: [], read: []},
  • js/models/relay.js

    diff --git a/js/models/relay.js b/js/models/relay.js
    index 878a7ce..8a617af 100644
    a b define([ 
    77], function($, _, Backbone){
    88
    99        var relayModel = Backbone.Model.extend({
    10         baseurl: 'http://onionoo.torproject.org',
     10        baseurl: 'https://onionoo.torproject.org',
    1111        fingerprint: '',
    1212        parseflags: function(flags, size) {
    1313            var output = [];