Skip to content

Commit

Permalink
Merge pull request #26 from Qwizi/0.0.30
Browse files Browse the repository at this point in the history
possible fix cors problem
  • Loading branch information
Qwizi authored Apr 23, 2024
2 parents 7fd6dbe + a76d77b commit 789b0c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cs2-battle-bot-api"
version = "0.0.29"
version = "0.0.30"
description = ""
authors = ["Adrian Ciolek <[email protected]>"]
readme = "README.md"
Expand Down
6 changes: 3 additions & 3 deletions src/cs2_battle_bot/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.environ.get("DEBUG", "True") == "True"

ALLOWED_HOSTS = os.environ.get("ALLOWED_HOSTS", "*").split(",")
ALLOWED_HOSTS = os.environ.get("ALLOWED_HOSTS", ["*"]).split(",")
CORS_ALLOWED_ORIGINS = os.environ.get("CORS_ALLOWED_ORIGINS", "http://localhost:8002").split(",")
CORS_ALLOW_ALL_ORIGINS = os.environ.get("CORS_ALLOW_ALL_ORIGINS", False)
CORS_ALLOW_ALL_ORIGINS = os.environ.get("CORS_ALLOW_ALL_ORIGINS", True)
CSRF_TRUSTED_ORIGINS = os.environ.get(
"CSRF_TRUSTED_ORIGINS", "http://localhost:8002"
).split(",")
Expand Down Expand Up @@ -90,9 +90,9 @@


MIDDLEWARE = [
"corsheaders.middleware.CorsMiddleware",
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"corsheaders.middleware.CorsMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
Expand Down

0 comments on commit 789b0c2

Please sign in to comment.