Merge branch 'master' into offline

* master:
  Logging favicons usage.
  Adding ip address to blocked windows devices.
This commit is contained in:
Samuel Clay 2013-06-22 17:12:56 -07:00
commit cb3d205dd6
3 changed files with 4 additions and 2 deletions

View file

@ -27,7 +27,8 @@ def login(request):
if not user_agent or user_agent.lower() in ['nativehost']:
errors = dict(user_agent="You must set a user agent to login.")
logging.user(request, "~FG~BB~SK~FRBlocked ~FGAPI Login~SN~FW: %s" % (user_agent))
ip = request.META.get('HTTP_X_REAL_IP', None) or request.META['REMOTE_ADDR']
logging.user(request, "~FG~BB~SK~FRBlocked ~FGAPI Login~SN~FW: %s / %s" % (user_agent, ip))
elif request.method == "POST":
form = LoginForm(data=request.POST)
if form.errors:

View file

@ -28,7 +28,7 @@ app.get /^\/rss_feeds\/icon\/(\d+)\/?/, (req, res) =>
feed_id = parseInt(req.params, 10)
etag = req.header('If-None-Match')
@collection.findOne _id: feed_id, (err, docs) ->
# console.log "Req: #{feed_id}, etag: #{etag}"
console.log "Req: #{feed_id}, etag: #{etag}/#{docs.color}"
if not err and etag and docs and docs.color == etag
res.send 304
else if not err and docs and docs.data

View file

@ -50,6 +50,7 @@
return _this.collection.findOne({
_id: feed_id
}, function(err, docs) {
console.log("Req: " + feed_id + ", etag: " + etag + "/" + docs.color);
if (!err && etag && docs && docs.color === etag) {
return res.send(304);
} else if (!err && docs && docs.data) {