diff --git a/backend/backend/__pycache__/settings.cpython-311.pyc b/backend/backend/__pycache__/settings.cpython-311.pyc index b0ee7eeb..cdcbd4ef 100644 Binary files a/backend/backend/__pycache__/settings.cpython-311.pyc and b/backend/backend/__pycache__/settings.cpython-311.pyc differ diff --git a/backend/backend/__pycache__/urls.cpython-311.pyc b/backend/backend/__pycache__/urls.cpython-311.pyc index 389ffc29..7fda6d5f 100644 Binary files a/backend/backend/__pycache__/urls.cpython-311.pyc and b/backend/backend/__pycache__/urls.cpython-311.pyc differ diff --git a/backend/backend/settings.py b/backend/backend/settings.py index 9b1208b6..c3a7ec98 100644 --- a/backend/backend/settings.py +++ b/backend/backend/settings.py @@ -60,7 +60,8 @@ MIDDLEWARE = [ MIDDLEWARE.insert(0, 'corsheaders.middleware.CorsMiddleware') CORS_ALLOWED_ORIGINS = [ - "volucy-gateway-e3d2bzbxdeaaayhz.westeurope-01.azurewebsites.net", + "https://volucy-gateway-e3d2bzbxdeaaayhz.westeurope-01.azurewebsites.net", + "http://localhost:3000", ] CORS_ALLOW_CREDENTIALS = True diff --git a/backend/backend/urls.py b/backend/backend/urls.py index 25fe0283..3844192f 100644 --- a/backend/backend/urls.py +++ b/backend/backend/urls.py @@ -2,5 +2,5 @@ from django.urls import path from .views import sample_api urlpatterns = [ - path('', sample_api), + path('api/data/', sample_api), ] diff --git a/frontend/frontend/src/App.js b/frontend/frontend/src/App.js index c90cb83b..fd02a121 100644 --- a/frontend/frontend/src/App.js +++ b/frontend/frontend/src/App.js @@ -6,7 +6,7 @@ function App() { useEffect(() => { const fetchData = async () => { try { - const response = await fetch(`${process.env.REACT_APP_API_URL}`); + const response = await fetch(`${process.env.REACT_APP_API_URL}/api/data/`); const result = await response.json(); setData(result.message); } catch (error) {