Create and enrich a WSGI environ dict for Lambda execution.
(
self, event: Dict[str, Any], context: Any, script_name: str, settings: ModuleType
)
| 472 | return asgi_handler, scope |
| 473 | |
| 474 | def _create_lambda_wsgi_environ( |
| 475 | self, event: Dict[str, Any], context: Any, script_name: str, settings: ModuleType |
| 476 | ) -> Dict[str, Any]: |
| 477 | """Create and enrich a WSGI environ dict for Lambda execution.""" |
| 478 | base_path = getattr(settings, "BASE_PATH", None) |
| 479 | environ = create_wsgi_request( |
| 480 | event, |
| 481 | script_name=script_name, |
| 482 | base_path=base_path, |
| 483 | trailing_slash=self.trailing_slash, |
| 484 | binary_support=settings.BINARY_SUPPORT, |
| 485 | context_header_mappings=settings.CONTEXT_HEADER_MAPPINGS, |
| 486 | ) |
| 487 | environ["HTTPS"] = "on" |
| 488 | environ["wsgi.url_scheme"] = "https" |
| 489 | environ["lambda.context"] = context |
| 490 | environ["lambda.event"] = event |
| 491 | return environ |
| 492 | |
| 493 | def _handle_asgi_request_v2( |
| 494 | self, event: Dict[str, Any], context: Any, script_name: str, settings: ModuleType |
no test coverage detected