diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-08-11 13:33:06 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-08-11 13:33:06 +0200 |
commit | 67c58a14f4f356117f42fea368a32359496d46c4 (patch) | |
tree | bb8d1019dc4547a215404a40b60a031ca4f2e21d /src/hydrilla/proxy/policies | |
parent | 3f3ba519ae3c3346945928b21ab36f7238e5387e (diff) | |
download | haketilo-hydrilla-67c58a14f4f356117f42fea368a32359496d46c4.tar.gz haketilo-hydrilla-67c58a14f4f356117f42fea368a32359496d46c4.zip |
populate data structures based on payloads data loaded from sqlite db
Diffstat (limited to 'src/hydrilla/proxy/policies')
-rw-r--r-- | src/hydrilla/proxy/policies/payload.py | 2 | ||||
-rw-r--r-- | src/hydrilla/proxy/policies/payload_resource.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/hydrilla/proxy/policies/payload.py b/src/hydrilla/proxy/policies/payload.py index d616f1b..1a88ea1 100644 --- a/src/hydrilla/proxy/policies/payload.py +++ b/src/hydrilla/proxy/policies/payload.py @@ -52,7 +52,7 @@ class PayloadAwarePolicy(base.Policy): """....""" token = self.payload_data.unique_token - base_path_segments = (*self.payload_data.pattern.path_segments, token) + base_path_segments = (*self.payload_data.pattern_path_segments, token) return f'{request_url.url_without_path}/{"/".join(base_path_segments)}/' diff --git a/src/hydrilla/proxy/policies/payload_resource.py b/src/hydrilla/proxy/policies/payload_resource.py index 84d0919..b255d4e 100644 --- a/src/hydrilla/proxy/policies/payload_resource.py +++ b/src/hydrilla/proxy/policies/payload_resource.py @@ -106,7 +106,7 @@ class PayloadResourcePolicy(PayloadAwarePolicy): # "/some/arbitrary/segments/<per-session_token>/actual/resource/path" # # Here we need to extract the "/actual/resource/path" part. - segments_to_drop = len(self.payload_data.pattern.path_segments) + 1 + segments_to_drop = len(self.payload_data.pattern_path_segments) + 1 resource_path = request_info.url.path_segments[segments_to_drop:] if resource_path == (): |