imperialwool commited on
Commit
2fddf68
1 Parent(s): dcc04a7
Files changed (1) hide show
  1. app.py +7 -11
app.py CHANGED
@@ -8,18 +8,19 @@ from routes import *
8
 
9
  #initing
10
  app = Flask(__name__)
11
- VERSION = '1.0 build87'
12
  app.config['JSON_AS_ASCII'] = False
13
  limiter = Limiter(app=app, key_func=get_remote_address, default_limits=["5/minute"], storage_uri="memory://",)
14
 
15
  #limiter
16
  @limiter.request_filter
17
  def ip_whitelist():
18
- try:
19
- if request.method == 'POST': signature = request.form['signature']
20
- else: signature = request.args['signature']
21
- return checkSignature(signature)
22
- except: return False
 
23
  #error pages
24
  @app.errorhandler(429)
25
  def ratelimit_handler(e): return render_template('ratelimit.html')
@@ -85,11 +86,6 @@ def getBMPreview(): return osuApi.getPreview(request)
85
  @app.route('/osu/api/v1/get-full', methods=['GET', 'POST'])
86
  def getBMFull(): return osuApi.getFull(request)
87
 
88
- ##############
89
- #shh
90
- @app.route('/aminocaptcha/api/v1/solve', methods=['GET', 'POST'])
91
- def predickt(): return aminoOSRapi.apipredict(request)
92
-
93
  if __name__ == "__main__":
94
  config = configFile()
95
  with open(config['config-path'], "w") as outfile:
 
8
 
9
  #initing
10
  app = Flask(__name__)
11
+ VERSION = '1.0 build89'
12
  app.config['JSON_AS_ASCII'] = False
13
  limiter = Limiter(app=app, key_func=get_remote_address, default_limits=["5/minute"], storage_uri="memory://",)
14
 
15
  #limiter
16
  @limiter.request_filter
17
  def ip_whitelist():
18
+ #try:
19
+ # if request.method == 'POST': signature = request.form['signature']
20
+ # else: signature = request.args['signature']
21
+ # return checkSignature(signature)
22
+ #except: return False
23
+ return True
24
  #error pages
25
  @app.errorhandler(429)
26
  def ratelimit_handler(e): return render_template('ratelimit.html')
 
86
  @app.route('/osu/api/v1/get-full', methods=['GET', 'POST'])
87
  def getBMFull(): return osuApi.getFull(request)
88
 
 
 
 
 
 
89
  if __name__ == "__main__":
90
  config = configFile()
91
  with open(config['config-path'], "w") as outfile: