mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
bbbb3b4a06
* Replace logging.warn with logging.warning * Install config global state early * Split config.py into more manageable pieces
29 lines
774 B
Python
29 lines
774 B
Python
from typing import Optional
|
|
|
|
from pydantic import Field
|
|
|
|
from .base import FrigateBaseModel
|
|
from .env import EnvString
|
|
|
|
__all__ = ["ProxyConfig", "HeaderMappingConfig"]
|
|
|
|
|
|
class HeaderMappingConfig(FrigateBaseModel):
|
|
user: str = Field(
|
|
default=None, title="Header name from upstream proxy to identify user."
|
|
)
|
|
|
|
|
|
class ProxyConfig(FrigateBaseModel):
|
|
header_map: HeaderMappingConfig = Field(
|
|
default_factory=HeaderMappingConfig,
|
|
title="Header mapping definitions for proxy user passing.",
|
|
)
|
|
logout_url: Optional[str] = Field(
|
|
default=None, title="Redirect url for logging out with proxy."
|
|
)
|
|
auth_secret: Optional[EnvString] = Field(
|
|
default=None,
|
|
title="Secret value for proxy authentication.",
|
|
)
|