Normalize request schemes to the browser Origin scheme space.
(scheme: str)
| 140 | |
| 141 | |
| 142 | def _normalize_origin_scheme(scheme: str) -> str: |
| 143 | """Normalize request schemes to the browser Origin scheme space.""" |
| 144 | if scheme == "ws": |
| 145 | return "http" |
| 146 | if scheme == "wss": |
| 147 | return "https" |
| 148 | return scheme |
| 149 | |
| 150 | |
| 151 | def _strip_optional_quotes(value: str) -> str: |
no outgoing calls
no test coverage detected