no rate limiting

This commit is contained in:
2017-03-19 22:25:58 -04:00
parent 934b7908c6
commit f1042e3f21
2 changed files with 0 additions and 19 deletions
-3
View File
@@ -7,10 +7,7 @@ gunicorn = "*"
decorator = "*"
brotlipy = "*"
gevent = "*"
redis = "*"
hiredis = "*"
Flask = "*"
Flask-Limiter = "*"
[packages.raven]
extras = [ "flask",]
-16
View File
@@ -16,8 +16,6 @@ import uuid
import argparse
from flask import Flask, Response, request, render_template, redirect, jsonify as flask_jsonify, make_response, url_for
from flask_limiter import Limiter
from flask_limiter.util import get_ipaddr
from six.moves import range as xrange
from werkzeug.datastructures import WWWAuthenticate, MultiDict
from werkzeug.http import http_date
@@ -59,20 +57,6 @@ app.debug = bool(os.environ.get('DEBUG'))
if 'SENTRY_DSN' in os.environ:
sentry = Sentry(app, dsn=os.environ['SENTRY_DSN'])
# Setup rate-limiting.
if 'REDIS_URL' in os.environ:
app.config['RATELIMIT_STORAGE_URL'] = os.environ['REDIS_URL']
app.config['RATELIMIT_HEADERS_ENABLED'] = True
limiter = Limiter(
app,
key_func=get_ipaddr,
global_limits=["100000 per day", "10000 per hour"]
)
# Set up Bugsnag exception tracking, if desired. To use Bugsnag, install the
# Bugsnag Python client with the command "pip install bugsnag", and set the
# environment variable BUGSNAG_API_KEY. You can also optionally set