Improve auth models
This commit is contained in:
@@ -4,6 +4,7 @@ Training service configuration
|
||||
|
||||
import os
|
||||
from pydantic_settings import BaseSettings
|
||||
from typing import List
|
||||
|
||||
class Settings(BaseSettings):
|
||||
"""Application settings"""
|
||||
@@ -38,6 +39,14 @@ class Settings(BaseSettings):
|
||||
PROPHET_WEEKLY_SEASONALITY: bool = os.getenv("PROPHET_WEEKLY_SEASONALITY", "true").lower() == "true"
|
||||
PROPHET_YEARLY_SEASONALITY: bool = os.getenv("PROPHET_YEARLY_SEASONALITY", "true").lower() == "true"
|
||||
|
||||
# CORS
|
||||
CORS_ORIGINS: str = os.getenv("CORS_ORIGINS", "http://localhost:3000,http://localhost:3001")
|
||||
|
||||
@property
|
||||
def CORS_ORIGINS_LIST(self) -> List[str]:
|
||||
"""Get CORS origins as list"""
|
||||
return [origin.strip() for origin in self.CORS_ORIGINS.split(",")]
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user