update
This commit is contained in:
parent
dc388112c4
commit
b9a8241cb7
5 changed files with 4 additions and 3 deletions
Binary file not shown.
Binary file not shown.
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ from django.urls import path
|
|||
from .views import sample_api
|
||||
|
||||
urlpatterns = [
|
||||
path('', sample_api),
|
||||
path('api/data/', sample_api),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue