Skip to content

Commit

Permalink
fix: wrong spell for ALLOWED_ORIGINS
Browse files Browse the repository at this point in the history
  • Loading branch information
M03ED committed Sep 4, 2024
1 parent 47d8336 commit f0a7e21
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
UVICORN_HOST = "0.0.0.0"
UVICORN_PORT = 8000
# ALLWED_ORIGINS=http://localhost,http://localhost:8000,http://example.com
# ALLOWED_ORIGINS=http://localhost,http://localhost:8000,http://example.com

## We highly recommend add admin using `marzban cli` tool and do not use
## the following variables which is somehow hard codded infrmation.
Expand Down
4 changes: 2 additions & 2 deletions app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from fastapi.routing import APIRoute
from fastapi_responses import custom_openapi

from config import DOCS, XRAY_SUBSCRIPTION_PATH, HOME_PAGE_TEMPLATE, ALLWED_ORIGINS
from config import DOCS, XRAY_SUBSCRIPTION_PATH, HOME_PAGE_TEMPLATE, ALLOWED_ORIGINS

__version__ = "0.6.0"

Expand All @@ -26,7 +26,7 @@

app.add_middleware(
CORSMiddleware,
allow_origins=ALLWED_ORIGINS,
allow_origins=ALLOWED_ORIGINS,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
Expand Down
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
DEBUG = config("DEBUG", default=False, cast=bool)
DOCS = config("DOCS", default=False, cast=bool)

ALLWED_ORIGINS = config("ALLWED_ORIGINS", default="*").split(",")
ALLOWED_ORIGINS = config("ALLOWED_ORIGINS", default="*").split(",")

VITE_BASE_API = f"http://127.0.0.1:{UVICORN_PORT}/api/" \
if DEBUG and config("VITE_BASE_API", default="/api/") == "/api/" \
Expand Down

0 comments on commit f0a7e21

Please sign in to comment.