test_is_cloud_metadata_hostnames() — langchain Function Reference
Architecture documentation for the test_is_cloud_metadata_hostnames() function in test_ssrf_protection.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 307aacb8_12a0_d587_5d94_f3fa23af9091["test_is_cloud_metadata_hostnames()"] 5d0af313_84be_a251_2294_d136a0904196["TestIPValidation"] 307aacb8_12a0_d587_5d94_f3fa23af9091 -->|defined in| 5d0af313_84be_a251_2294_d136a0904196 style 307aacb8_12a0_d587_5d94_f3fa23af9091 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/test_ssrf_protection.py lines 55–60
def test_is_cloud_metadata_hostnames(self) -> None:
"""Test cloud metadata hostname detection."""
assert is_cloud_metadata("metadata.google.internal") is True
assert is_cloud_metadata("metadata") is True
assert is_cloud_metadata("instance-data") is True
assert is_cloud_metadata("METADATA.GOOGLE.INTERNAL") is True # Case insensitive
Domain
Subdomains
Source
Frequently Asked Questions
What does test_is_cloud_metadata_hostnames() do?
test_is_cloud_metadata_hostnames() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/test_ssrf_protection.py.
Where is test_is_cloud_metadata_hostnames() defined?
test_is_cloud_metadata_hostnames() is defined in libs/core/tests/unit_tests/test_ssrf_protection.py at line 55.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free