Skip to content

Commit 3ce604e

Browse files
committed
Update default csrf_trusted_origins
1 parent e158aa3 commit 3ce604e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

llmstack/settings.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
import os
22
from pathlib import Path
3-
from dotenv import load_dotenv
43

54
from django.utils.log import DEFAULT_LOGGING
65

7-
load_dotenv(dotenv_path='.env.dev')
8-
9-
106
# Build paths inside the project like this: BASE_DIR / 'subdir'.
117
BASE_DIR = Path(__file__).resolve().parent.parent
128

@@ -24,9 +20,11 @@
2420
'127.0.0.1,localhost',
2521
).split(',')
2622

23+
LLMSTACK_PORT = os.getenv('LLMSTACK_PORT', 3000)
24+
2725
CSRF_TRUSTED_ORIGINS = os.getenv(
2826
'CSRF_TRUSTED_ORIGINS',
29-
'http://127.0.0.1:3000,http://localhost:3000',
27+
f'http://127.0.0.1:{LLMSTACK_PORT},http://localhost:{LLMSTACK_PORT}',
3028
).split(',')
3129

3230
STATIC_ROOT = os.path.join(BASE_DIR, 'static')

0 commit comments

Comments
 (0)