File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
localstack-core/localstack/aws/protocol Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,14 @@ def custom_path_addressing_rules(path: str) -> Optional[ServiceModelIdentifier]:
171
171
return ServiceModelIdentifier ("lambda" )
172
172
173
173
174
+ well_known_path_prefixes = (
175
+ "/_aws" ,
176
+ "/_localstack" ,
177
+ "/_pods" ,
178
+ "/_extension" ,
179
+ )
180
+
181
+
174
182
def legacy_rules (request : Request ) -> Optional [ServiceModelIdentifier ]:
175
183
"""
176
184
*Legacy* rules which migrate routing logic which will become obsolete with the ASF Gateway.
@@ -192,8 +200,9 @@ def legacy_rules(request: Request) -> Optional[ServiceModelIdentifier]:
192
200
193
201
# TODO Remove once fallback to S3 is disabled (after S3 ASF and Cors rework)
194
202
# necessary for correct handling of cors for internal endpoints
195
- if path .startswith ("/_localstack" ) or path .startswith ("/_pods" ) or path .startswith ("/_aws" ):
196
- return None
203
+ for prefix in well_known_path_prefixes :
204
+ if path .startswith (prefix ):
205
+ return None
197
206
198
207
# TODO The remaining rules here are special S3 rules - needs to be discussed how these should be handled.
199
208
# Some are similar to other rules and not that greedy, others are nearly general fallbacks.
You can’t perform that action at this time.
0 commit comments