Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

History

History
History
26 lines (19 loc) 路 899 Bytes

File metadata and controls

26 lines (19 loc) 路 899 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import logging
from localstack import config
from localstack.runtime import hooks
LOG = logging.getLogger(__name__)
@hooks.configure_localstack_container()
def configure_edge_port(container):
ports = [config.EDGE_PORT, config.EDGE_PORT_HTTP]
LOG.debug("configuring container with edge ports: %s", ports)
for port in ports:
if port:
container.ports.add(port)
# Register the ArnPartitionRewriteListener only if the feature flag is enabled
@hooks.on_infra_start(should_load=lambda: config.ARN_PARTITION_REWRITING)
def register_partition_adjusting_proxy_listener():
LOG.info(
"Registering ArnPartitionRewriteListener to dynamically replace partitions in requests and responses."
)
from localstack.services.generic_proxy import ArnPartitionRewriteListener, ProxyListener
ProxyListener.DEFAULT_LISTENERS.append(ArnPartitionRewriteListener())
Morty Proxy This is a proxified and sanitized view of the page, visit original site.