This commit is contained in:
idittrich-valueon 2025-03-09 11:24:14 +01:00
parent dc388112c4
commit b9a8241cb7
5 changed files with 4 additions and 3 deletions

View file

@ -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

View file

@ -2,5 +2,5 @@ from django.urls import path
from .views import sample_api
urlpatterns = [
path('', sample_api),
path('api/data/', sample_api),
]

View file

@ -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) {