clear-skies 1.18.17__py3-none-any.whl → 1.18.19__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 clear-skies might be problematic. Click here for more details.
- {clear_skies-1.18.17.dist-info → clear_skies-1.18.19.dist-info}/METADATA +1 -1
- {clear_skies-1.18.17.dist-info → clear_skies-1.18.19.dist-info}/RECORD +7 -7
- clearskies/handlers/simple_routing.py +1 -0
- clearskies/handlers/simple_routing_route.py +6 -0
- clearskies/security_headers/cors.py +2 -2
- {clear_skies-1.18.17.dist-info → clear_skies-1.18.19.dist-info}/LICENSE +0 -0
- {clear_skies-1.18.17.dist-info → clear_skies-1.18.19.dist-info}/WHEEL +0 -0
|
@@ -143,8 +143,8 @@ clearskies/handlers/request_method_routing.py,sha256=DgPEz3tgbaUkXHsOriPbIctfSf4
|
|
|
143
143
|
clearskies/handlers/restful_api.py,sha256=1rJ2REX1sTAdbqaRuCclP375agrho4zNNQx6hXGa4nQ,9258
|
|
144
144
|
clearskies/handlers/routing.py,sha256=uWKWcEaiHVqfDebPkQVuG9AS8pOixW31wW0yIQ-25Aw,3079
|
|
145
145
|
clearskies/handlers/schema_helper.py,sha256=62644USvFlZu_6tT7rb-k6t_5J3Q0uZsJwP5KREk_WM,4961
|
|
146
|
-
clearskies/handlers/simple_routing.py,sha256=
|
|
147
|
-
clearskies/handlers/simple_routing_route.py,sha256=
|
|
146
|
+
clearskies/handlers/simple_routing.py,sha256=KpOSQK2_tTwrPblDmxAUpX-Fqts_Or_MLWGKOOkJnoo,9403
|
|
147
|
+
clearskies/handlers/simple_routing_route.py,sha256=kDoplYQW54WvROgHOAq5yLqloIMHnIIWZHCnkmzT_G0,8924
|
|
148
148
|
clearskies/handlers/simple_search.py,sha256=hZ0rMfhS-BB6LTpdl0I53pEUBgbgIwtXvcW_8ZEOZOs,6003
|
|
149
149
|
clearskies/handlers/update.py,sha256=VCZkoID7i5VHq78fkIpjbRdXQ4Z3IuXEE5dfC8z4RZI,4088
|
|
150
150
|
clearskies/handlers/write.py,sha256=VduGtjnFMQOvo3l0t-tUP4PExPJ9JEpuziHsquF08rE,9344
|
|
@@ -177,7 +177,7 @@ clearskies/secrets/secrets.py,sha256=eY2cl5U6DVy2vpFTQFjSBtyU4dzQEX228BeNyMk-b7s
|
|
|
177
177
|
clearskies/security_headers/__init__.py,sha256=rj1xEQPJQWblHYyOaBdhLQC_3lCZ-RNAL38-z8-F3wc,179
|
|
178
178
|
clearskies/security_headers/base.py,sha256=pY3CyISjbO-Sl2TNlz79qhKqQu-akvDS3FfaiDpyGUI,243
|
|
179
179
|
clearskies/security_headers/cache_control.py,sha256=nvDpObXZnJ8MuhutmuEznorjLxRzP8QDRYPPHQR3l7k,3705
|
|
180
|
-
clearskies/security_headers/cors.py,sha256=
|
|
180
|
+
clearskies/security_headers/cors.py,sha256=m_DXgiCtxm17cRltCRqLvZzsiqwp6eO-B7f-l2NTfUg,3706
|
|
181
181
|
clearskies/security_headers/csp.py,sha256=A9LEF87xZ_9_xplFm7dXNUYs52cTiiokAXjJpKIYGg4,4372
|
|
182
182
|
clearskies/security_headers/hsts.py,sha256=3VtHZk84SqrNRrN6iuBOVFGxqm4iXiTmFt0FNqtodWc,765
|
|
183
183
|
clearskies/security_headers/x_content_type_options.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -188,7 +188,7 @@ clearskies/tests/simple_api/models/__init__.py,sha256=nUA0W6fgXw_Bxa9CudkaDkC80t
|
|
|
188
188
|
clearskies/tests/simple_api/models/status.py,sha256=PEhPbaQh5qdUNHp8O0gz91LOLENAEBtqSaHxUPXchaM,699
|
|
189
189
|
clearskies/tests/simple_api/models/user.py,sha256=5_P4Tp1tTdX7PkMJ__epPM5MA7JAeVYGas69vcWloLc,819
|
|
190
190
|
clearskies/tests/simple_api/users_api.py,sha256=KYXCgEofDxHeRdQK67txN5oYUPvxxmB8JTku7L-apk4,2344
|
|
191
|
-
clear_skies-1.18.
|
|
192
|
-
clear_skies-1.18.
|
|
193
|
-
clear_skies-1.18.
|
|
194
|
-
clear_skies-1.18.
|
|
191
|
+
clear_skies-1.18.19.dist-info/LICENSE,sha256=3Ehd0g3YOpCj8sqj0Xjq5qbOtjjgk9qzhhD9YjRQgOA,1053
|
|
192
|
+
clear_skies-1.18.19.dist-info/METADATA,sha256=-9L2NAPT7lFr9VeuQfCs3JRYyDnCKAkoN0oNkXk6zf4,1367
|
|
193
|
+
clear_skies-1.18.19.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
194
|
+
clear_skies-1.18.19.dist-info/RECORD,,
|
|
@@ -19,6 +19,7 @@ class SimpleRoutingRoute:
|
|
|
19
19
|
_routes_to_simple_routing = False
|
|
20
20
|
_bindings = None
|
|
21
21
|
_path_parameter_with_slashes = None
|
|
22
|
+
_has_sub_paths = None
|
|
22
23
|
|
|
23
24
|
def __init__(self, di):
|
|
24
25
|
self._di = di
|
|
@@ -34,6 +35,7 @@ class SimpleRoutingRoute:
|
|
|
34
35
|
security_headers=None,
|
|
35
36
|
path_parameter_with_slashes=None,
|
|
36
37
|
bindings=None,
|
|
38
|
+
has_sub_paths=True,
|
|
37
39
|
):
|
|
38
40
|
if authentication is not None and not handler_config.get("authentication"):
|
|
39
41
|
handler_config["authentication"] = authentication
|
|
@@ -49,6 +51,7 @@ class SimpleRoutingRoute:
|
|
|
49
51
|
self._resource_paths = self._extract_resource_paths(self._path_parts)
|
|
50
52
|
self._bindings = bindings if bindings else {}
|
|
51
53
|
self._path_parameter_with_slashes = path_parameter_with_slashes if path_parameter_with_slashes else []
|
|
54
|
+
self._has_sub_paths = has_sub_paths
|
|
52
55
|
if methods is not None:
|
|
53
56
|
self._methods = [methods.upper()] if isinstance(methods, str) else [met.upper() for met in methods]
|
|
54
57
|
sub_handler_config = {
|
|
@@ -128,6 +131,9 @@ class SimpleRoutingRoute:
|
|
|
128
131
|
if full_path[:my_path_length] != my_path:
|
|
129
132
|
logger.debug(f"{incoming} Not a match. Our prefixes just don't match.")
|
|
130
133
|
return None
|
|
134
|
+
if not self._has_sub_paths and full_path_length > my_path_length:
|
|
135
|
+
logger.debug(f"{incoming} Not a match. It's a partial match but I'm not allowed to do that.")
|
|
136
|
+
return None
|
|
131
137
|
# make sure we don't get confused by partial matches. `user` should match `user/` and `user/5`,
|
|
132
138
|
# but it shouldn't match `users/`
|
|
133
139
|
if full_path_length > my_path_length and full_path[my_path_length] != "/":
|
|
@@ -36,7 +36,7 @@ class CORS(Base):
|
|
|
36
36
|
def add_header(self, header):
|
|
37
37
|
if not self.headers:
|
|
38
38
|
self.headers = header
|
|
39
|
-
|
|
39
|
+
elif header not in self.headers:
|
|
40
40
|
self.headers += ", " + header
|
|
41
41
|
|
|
42
42
|
def set_methods(self, methods):
|
|
@@ -47,7 +47,7 @@ class CORS(Base):
|
|
|
47
47
|
def add_method(self, method):
|
|
48
48
|
if not self.methods:
|
|
49
49
|
self.methods = method
|
|
50
|
-
|
|
50
|
+
elif method not in self.methods:
|
|
51
51
|
self.methods += ", " + method
|
|
52
52
|
|
|
53
53
|
def set_headers_for_input_output(self, input_output):
|
|
File without changes
|
|
File without changes
|