Skip to content

Commit eddb24d

Browse files
committed
rota para checar CORS-Origins
1 parent 3f0ccb2 commit eddb24d

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

backend/app/api/routes/utils.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from app.api.deps import get_current_active_superuser
55
from app.models import Message
66
from app.utils import generate_test_email, send_email
7+
from app.core.config import settings
78

89
router = APIRouter(prefix="/utils", tags=["utils"])
910

@@ -29,3 +30,10 @@ def test_email(email_to: EmailStr) -> Message:
2930
@router.get("/health-check/")
3031
async def health_check() -> bool:
3132
return True
33+
34+
@router.get("/cors-origins/")
35+
async def get_cors_origins() -> list[str]:
36+
"""
37+
Get the CORS origins.
38+
"""
39+
return settings.all_cors_origins

0 commit comments

Comments
 (0)