(self)
| 312 | |
| 313 | @property |
| 314 | def scheme(self): |
| 315 | if settings.SECURE_PROXY_SSL_HEADER: |
| 316 | try: |
| 317 | header, secure_value = settings.SECURE_PROXY_SSL_HEADER |
| 318 | except ValueError: |
| 319 | raise ImproperlyConfigured( |
| 320 | "The SECURE_PROXY_SSL_HEADER setting must be a tuple containing " |
| 321 | "two values." |
| 322 | ) |
| 323 | header_value = self.META.get(header) |
| 324 | if header_value is not None: |
| 325 | header_value, *_ = header_value.split(",", 1) |
| 326 | return "https" if header_value.strip() == secure_value else "http" |
| 327 | return self._get_scheme() |
| 328 | |
| 329 | def is_secure(self): |
| 330 | return self.scheme == "https" |
nothing calls this directly
no test coverage detected