mdbq 4.0.94__py3-none-any.whl → 4.0.95__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mdbq might be problematic. Click here for more details.
- mdbq/__version__.py +1 -1
- mdbq/auth/auth_backend.py +8 -0
- {mdbq-4.0.94.dist-info → mdbq-4.0.95.dist-info}/METADATA +1 -1
- {mdbq-4.0.94.dist-info → mdbq-4.0.95.dist-info}/RECORD +6 -6
- {mdbq-4.0.94.dist-info → mdbq-4.0.95.dist-info}/WHEEL +0 -0
- {mdbq-4.0.94.dist-info → mdbq-4.0.95.dist-info}/top_level.txt +0 -0
mdbq/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION = '4.0.
|
|
1
|
+
VERSION = '4.0.95'
|
mdbq/auth/auth_backend.py
CHANGED
|
@@ -1545,6 +1545,10 @@ def require_auth(auth_manager):
|
|
|
1545
1545
|
def decorator(f):
|
|
1546
1546
|
@wraps(f)
|
|
1547
1547
|
def decorated_function(*args, **kwargs):
|
|
1548
|
+
# OPTIONS请求不需要认证
|
|
1549
|
+
if request.method == 'OPTIONS':
|
|
1550
|
+
return f(*args, **kwargs)
|
|
1551
|
+
|
|
1548
1552
|
auth_header = request.headers.get('Authorization')
|
|
1549
1553
|
if not auth_header or not auth_header.startswith('Bearer '):
|
|
1550
1554
|
return {'status': 'error', 'message': '未提供认证令牌'}, 401
|
|
@@ -1577,6 +1581,10 @@ def require_permissions(auth_manager, required_permissions):
|
|
|
1577
1581
|
def decorator(f):
|
|
1578
1582
|
@wraps(f)
|
|
1579
1583
|
def decorated_function(*args, **kwargs):
|
|
1584
|
+
# OPTIONS请求不需要认证
|
|
1585
|
+
if request.method == 'OPTIONS':
|
|
1586
|
+
return f(*args, **kwargs)
|
|
1587
|
+
|
|
1580
1588
|
auth_header = request.headers.get('Authorization')
|
|
1581
1589
|
if not auth_header or not auth_header.startswith('Bearer '):
|
|
1582
1590
|
return {'status': 'error', 'message': '未提供认证令牌'}, 401
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
mdbq/__init__.py,sha256=Il5Q9ATdX8yXqVxtP_nYqUhExzxPC_qk_WXQ_4h0exg,16
|
|
2
|
-
mdbq/__version__.py,sha256=
|
|
2
|
+
mdbq/__version__.py,sha256=_cjJRgt5f4NvaVHrfLAZ5D43gJ6Uuxh9IhEFJwJ5Kc0,18
|
|
3
3
|
mdbq/auth/__init__.py,sha256=pnPMAt63sh1B6kEvmutUuro46zVf2v2YDAG7q-jV_To,24
|
|
4
|
-
mdbq/auth/auth_backend.py,sha256=
|
|
4
|
+
mdbq/auth/auth_backend.py,sha256=54xSg9pDw5W7otm1dcvksQiJLRGDKuNRb83whUOjI_0,69933
|
|
5
5
|
mdbq/auth/rate_limiter.py,sha256=e7K8pMQlZ1vm1N-c0HBH8tbAwzcmXSRiAl81JNZ369g,26192
|
|
6
6
|
mdbq/js/__init__.py,sha256=hpMi3_ZKwIWkzc0LnKL-SY9AS-7PYFHq0izYTgEvxjc,30
|
|
7
7
|
mdbq/js/jc.py,sha256=FOc6HOOTJwnoZLZmgmaE1SQo9rUnVhXmefhKMD2MlDA,13229
|
|
@@ -33,7 +33,7 @@ mdbq/route/routes.py,sha256=QVGfTvDgu0CpcKCvk1ra74H8uojgqTLUav1fnVAqLEA,29433
|
|
|
33
33
|
mdbq/selenium/__init__.py,sha256=AKzeEceqZyvqn2dEDoJSzDQnbuENkJSHAlbHAD0u0ZI,10
|
|
34
34
|
mdbq/selenium/get_driver.py,sha256=1NTlVUE6QsyjTrVVVqTO2LOnYf578ccFWlWnvIXGtic,20903
|
|
35
35
|
mdbq/spider/__init__.py,sha256=RBMFXGy_jd1HXZhngB2T2XTvJqki8P_Fr-pBcwijnew,18
|
|
36
|
-
mdbq-4.0.
|
|
37
|
-
mdbq-4.0.
|
|
38
|
-
mdbq-4.0.
|
|
39
|
-
mdbq-4.0.
|
|
36
|
+
mdbq-4.0.95.dist-info/METADATA,sha256=n82sUxYXuss5vPMrmpxRv3IQtOOjGlam91iAgYv8n5w,364
|
|
37
|
+
mdbq-4.0.95.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
38
|
+
mdbq-4.0.95.dist-info/top_level.txt,sha256=2FQ-uLnCSB-OwFiWntzmwosW3X2Xqsg0ewh1axsaylA,5
|
|
39
|
+
mdbq-4.0.95.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|