diff --git a/apps/rss_feeds/models.py b/apps/rss_feeds/models.py index 4098f64db..90942a27e 100644 --- a/apps/rss_feeds/models.py +++ b/apps/rss_feeds/models.py @@ -1506,7 +1506,7 @@ class Feed(models.Model): self.min_to_decay = total delta = self.next_scheduled_update - datetime.datetime.now() - minutes_to_next_fetch = delta.total_seconds() / 60 + minutes_to_next_fetch = (delta.seconds + (delta.days * 24 * 3600)) / 60 if minutes_to_next_fetch > self.min_to_decay or not skip_scheduling: self.next_scheduled_update = next_scheduled_update if self.active_subscribers >= 1: diff --git a/clients/android/NewsBlur/res/menu/context_story.xml b/clients/android/NewsBlur/res/menu/context_story.xml index d5d0b2741..ea12774c7 100644 --- a/clients/android/NewsBlur/res/menu/context_story.xml +++ b/clients/android/NewsBlur/res/menu/context_story.xml @@ -4,15 +4,15 @@ + + - - diff --git a/config/gunicorn_conf.py b/config/gunicorn_conf.py index 4bb942ee2..f67b6d1c7 100644 --- a/config/gunicorn_conf.py +++ b/config/gunicorn_conf.py @@ -13,7 +13,8 @@ loglevel = "debug" name = "newsblur" timeout = 120 max_requests = 1000 -x_forwarded_for_header = "X-Forwarded-For" +x_forwarded_for_header = "X-FORWARDED-FOR" +forwarded_allow_ips = "*" if GIGS_OF_MEMORY > NUM_CPUS: workers = NUM_CPUS diff --git a/config/nginx.conf b/config/nginx.conf index ad2f0dc54..cb2a49a4f 100644 --- a/config/nginx.conf +++ b/config/nginx.conf @@ -19,6 +19,10 @@ http { keepalive_timeout 2; client_max_body_size 4M; + set_real_ip_from 0.0.0.0/0; + real_ip_header X-Forwarded-For; + # real_ip_recursive on; + gzip on; gzip_static on; gzip_comp_level 2; diff --git a/config/nginx.newsblur.conf b/config/nginx.newsblur.conf index 7050bd766..94c25a2c7 100644 --- a/config/nginx.newsblur.conf +++ b/config/nginx.newsblur.conf @@ -19,7 +19,11 @@ server { client_max_body_size 4M; server_name www.newsblur.com newsblur.com dev.newsblur.com *.newsblur.com circularapp.com *.circularapp.com; add_header X-nginx-server nginx_none; - + + set_real_ip_from 0.0.0.0/0; + real_ip_header X-Forwarded-For; + real_ip_recursive on; + # if ($host = 'newsblur.com') { # rewrite ^/(.*)$ https://www.newsblur.com/$1 permanent; # } diff --git a/config/requirements.txt b/config/requirements.txt index fe74dbad6..a96037a0a 100755 --- a/config/requirements.txt +++ b/config/requirements.txt @@ -37,9 +37,12 @@ raven==3.1.17 readline==6.2.4.1 redis==2.8.0 hiredis==0.1.1 -requests==1.1.0 +requests==2.2.1 seacucumber==1.5 South==0.7.6 stripe==1.12.2 django-oauth-toolkit==0.5.0 -django-cors-headers==0.12 \ No newline at end of file +django-cors-headers==0.12 +pyOpenSSL==0.14 +pyasn1==0.1.7 +ndg-httpsclient==0.3.2 diff --git a/fabfile.py b/fabfile.py index 8ea284164..f50a0ddc7 100644 --- a/fabfile.py +++ b/fabfile.py @@ -313,6 +313,7 @@ def setup_installs(): 'libncurses5-dev', 'libdbd-pg-perl', 'libssl-dev', + 'libffi-dev', 'make', 'pgbouncer', 'python-setuptools', @@ -596,7 +597,7 @@ def setup_nginx(): run('tar -xzf nginx-%s.tar.gz' % NGINX_VERSION) run('rm nginx-%s.tar.gz' % NGINX_VERSION) with cd('nginx-%s' % NGINX_VERSION): - run('./configure --with-http_ssl_module --with-http_stub_status_module --with-http_gzip_static_module') + run('./configure --with-http_ssl_module --with-http_stub_status_module --with-http_gzip_static_module --with-http_realip_module ') run('make') sudo('make install') config_nginx() diff --git a/media/css/reader.css b/media/css/reader.css index 34474134e..b5dd7596c 100644 --- a/media/css/reader.css +++ b/media/css/reader.css @@ -8127,7 +8127,9 @@ form.opml_import_form input { width: auto; border: 1px solid #909090; } - +.NB-modal-feedchooser .NB-feedchooser .NB-hidden { + display: block; +} .NB-modal-feedchooser .NB-modal-submit.NB-modal-submit-paypal { border-radius: 12px; border: 1px solid #F6BD44; diff --git a/media/js/newsblur/reader/reader_feedchooser.js b/media/js/newsblur/reader/reader_feedchooser.js index 2acab2bf4..866565820 100644 --- a/media/js/newsblur/reader/reader_feedchooser.js +++ b/media/js/newsblur/reader/reader_feedchooser.js @@ -205,6 +205,9 @@ NEWSBLUR.ReaderFeedchooser.prototype = { // Pretend unfetched feeds are fine $('.NB-feed-unfetched', $feeds).removeClass('NB-feed-unfetched'); + + // Make sure all folders are visible + $('.NB-folder.NB-hidden', $feeds).removeClass('NB-hidden'); $('.unread_count_positive', $feeds).text('On'); $('.unread_count_negative', $feeds).text('Off'); @@ -554,4 +557,4 @@ NEWSBLUR.ReaderFeedchooser.prototype = { }); } -}; \ No newline at end of file +}; diff --git a/templates/static/api.yml b/templates/static/api.yml index 70de8d65e..379f5b684 100644 --- a/templates/static/api.yml +++ b/templates/static/api.yml @@ -458,6 +458,14 @@ desc: "List of feed ids to mark as read." required: true example: "feed_id=12&feed_id=24" + - key: cutoff_timestamp + desc: "Timestamp for older/newer cutoff." + optional: true + example: "1400777921" + - key: direction + desc: "Older or newer stories should be marked as read. Use with `cutoff_timestamp`" + optional: true + example: "older" tips: - "To mark a folder as read, send the ids of each feed inside the folder."