mirror of https://github.com/Aidaho12/haproxy-wi
v8.0.1: Change forbidden error to unauthorized for subscription check
Updated the error code returned when a user's subscription is either inactive or on a Home plan from 403 (Forbidden) to 401 (Unauthorized). This makes the response more semantically accurate, indicating that authentication is required and has failed.pull/399/head
parent
8964652375
commit
902f94d052
|
@ -27,7 +27,7 @@ def before_request():
|
|||
""" Protect all the API endpoints. """
|
||||
user_subscription = roxywi_common.return_user_subscription()
|
||||
if user_subscription['user_status'] == 0 or user_subscription['user_plan'] == 'user':
|
||||
abort(403, 'Your subscription is not active or you are on a Home plan.')
|
||||
abort(401, 'Your subscription is not active or you are on a Home plan.')
|
||||
pass
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue