Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5920efa

Browse files
code refactored
1 parent 3803ac0 commit 5920efa

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

‎src/authorize/authorize.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ async def return_kwargs(kwargs):
185185
request: Request = kwargs.get('request')
186186
api_key = request.query_params.get('api_key')
187187
path = kwargs.get('path')
188-
auth_logger.info(f"path : {path}, api_key : {api_key}")
189188
return api_key, path
190189

191190
async def rate_limiter(api_key):
@@ -260,7 +259,7 @@ async def wrapper(*args, **kwargs):
260259

261260
if not monthly_credit:
262261
mess: str = f"EOD Stock API - Your Monthly plan request limit has been reached. " \
263-
f"please upgrade your plan, to take advantage of our soft limits"
262+
f"please upgrade your plan, or buy extra Credits"
264263
raise NotAuthorized(message=mess)
265264

266265
return wrapper

‎src/main/main.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@ async def validate_request_middleware(request, call_next):
254254
# You can modify the request here, or perform any other
255255
# pre-processing that you need.
256256
# allowedPaths = ["/", "/api/", "/redoc", "/docs", "/_admin/"]
257-
app_logger.info("validate_request")
258257
async def compare_tokens():
259258
"""will check headers to see if the request comes from cloudflare"""
260259
_cf_secret_token = request.headers.get('X-SECRET-TOKEN')
@@ -281,7 +280,7 @@ async def compare_tokens():
281280
"message": "Request Contains Suspicious patterns cannot continue"}
282281
response = JSONResponse(content=mess, status_code=404)
283282
return response
284-
app_logger.info(f"Request is not malicios")
283+
285284
if path.startswith("/_admin") or path.startswith("/redoc") or path.startswith("/docs") or path.startswith(
286285
"/static"):
287286
app_logger.info("starts with admin going in ")

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /