(self, server_name: str, path: str)
| 1409 | """The ``SameSite`` parameter.""" |
| 1410 | |
| 1411 | def _matches_request(self, server_name: str, path: str) -> bool: |
| 1412 | return ( |
| 1413 | server_name == self.domain |
| 1414 | or ( |
| 1415 | not self.origin_only |
| 1416 | and server_name.endswith(self.domain) |
| 1417 | and server_name[: -len(self.domain)].endswith(".") |
| 1418 | ) |
| 1419 | ) and ( |
| 1420 | path == self.path |
| 1421 | or ( |
| 1422 | path.startswith(self.path) |
| 1423 | and path[len(self.path) - self.path.endswith("/") :].startswith("/") |
| 1424 | ) |
| 1425 | ) |
| 1426 | |
| 1427 | def _to_request_header(self) -> str: |
| 1428 | return f"{self.key}={self.value}" |
no outgoing calls
no test coverage detected