toaster update :3
Some checks failed
Build and push container image / build-and-push-image (push) Failing after 5m28s
Some checks failed
Build and push container image / build-and-push-image (push) Failing after 5m28s
This commit is contained in:
@@ -36,7 +36,7 @@ def not_found(error=None):
|
||||
log.warning("Page not found: %s", error)
|
||||
scores = snake.get_leaderboard()
|
||||
token = snake.generate_start_token()
|
||||
return render_template('errors/404.html', scores=scores, token=token), 404 if error is not None else 200
|
||||
return render_template('errors/404.html', scores=scores, token=token, cap_key=env('CAP_KEY', default='')), 404 if error is not None else 200
|
||||
|
||||
|
||||
# Route for 400 error
|
||||
|
@@ -46,7 +46,7 @@ def valid_score(score, game_token):
|
||||
current_time = datetime.datetime.now()
|
||||
elapsed_time = (current_time - start_time).total_seconds()
|
||||
|
||||
if elapsed_time < score / 10 * 5 + 15: # assuming that each point takes 5 seconds to achieve and 15 seconds to start the game and do captcha
|
||||
if elapsed_time < score / 10 * 3 + 10: # assuming that each point takes 3 seconds to achieve and 10 seconds to start the game and do captcha
|
||||
log.error("Score is too high for the elapsed time.")
|
||||
return False
|
||||
|
||||
|
@@ -23,7 +23,7 @@ def verify_captcha(token: str) -> bool:
|
||||
|
||||
try:
|
||||
response = requests.post(
|
||||
env('CAP_VERIFY_URL', default='https://<instance_url>/<key_id>/siteverify'),
|
||||
f"https://cap.alfieking.dev/{env('CAP_KEY', default='')}/siteverify",
|
||||
json={
|
||||
'secret': env('CAP_SECRET', default=''),
|
||||
'response': token,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
# Imports
|
||||
from flask import Flask, request, render_template, send_from_directory, abort
|
||||
from flask import Flask
|
||||
from flask_session import Session
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
Reference in New Issue
Block a user