mirror of
https://github.com/viq/NewsBlur.git
synced 2025-08-31 22:20:12 +00:00
Fixing 500 on Blar's empty requests for marking stories as read. Updating nginx conf.
This commit is contained in:
parent
40051bf838
commit
397e0367e6
2 changed files with 13 additions and 4 deletions
|
@ -39,6 +39,7 @@ from utils.story_functions import format_story_link_date__long
|
|||
from utils.story_functions import bunch
|
||||
from utils.story_functions import story_score
|
||||
from utils import log as logging
|
||||
from utils.view_functions import get_argument_or_404
|
||||
from vendor.timezones.utilities import localtime_for_timezone
|
||||
|
||||
SINGLE_DAY = 60*60*24
|
||||
|
@ -644,7 +645,7 @@ def mark_all_as_read(request):
|
|||
@json.json_view
|
||||
def mark_story_as_read(request):
|
||||
story_ids = request.REQUEST.getlist('story_id')
|
||||
feed_id = int(request.REQUEST['feed_id'])
|
||||
feed_id = int(get_argument_or_404(request, 'feed_id'))
|
||||
|
||||
try:
|
||||
usersub = UserSubscription.objects.select_related('feed').get(user=request.user, feed=feed_id)
|
||||
|
|
|
@ -1,11 +1,18 @@
|
|||
upstream app_server {
|
||||
server 127.0.0.1:8000 fail_timeout=1;
|
||||
server 127.0.0.1:8000 fail_timeout=10 max_fails=3 ;
|
||||
server app02.newsblur.com:80 fail_timeout=10 max_fails=3 ;
|
||||
# server db01.newsblur.com:80 fail_timeout=10 max_fails=3 down;
|
||||
}
|
||||
|
||||
server {
|
||||
server_name newsblur.com;
|
||||
rewrite ^(.*) http://www.newsblur.com$1 permanent;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80 default;
|
||||
client_max_body_size 4M;
|
||||
server_name _;
|
||||
server_name www.newsblur.com;
|
||||
|
||||
location /media/admin/ {
|
||||
alias /usr/local/lib/python2.6/dist-packages/Django-1.2.5-py2.6.egg/django/contrib/admin/media/;
|
||||
|
@ -40,7 +47,8 @@ server {
|
|||
|
||||
location / {
|
||||
if (-f /home/sclay/newsblur/media/maintenance.html) {
|
||||
expires -1;
|
||||
expires 10;
|
||||
add_header Cache-Control private;
|
||||
rewrite ^(.*)$ /media/maintenance.html last;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue