From c2ac6444576034d465498b105bb93c3f0a9c1a1f Mon Sep 17 00:00:00 2001 From: c-d-p Date: Wed, 23 Apr 2025 15:12:05 +0200 Subject: [PATCH] added maia.depaoli.id.au as an accepted CORS domain & changed frontend to reflect --- backend/main.py | 2 +- interfaces/nativeapp/src/api/client.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/main.py b/backend/main.py index 46eb1f7..1ce5c1d 100644 --- a/backend/main.py +++ b/backend/main.py @@ -39,7 +39,7 @@ app.add_middleware( "http://localhost:8081", # Keep for web testing if needed "http://192.168.1.9:8081", # Add your mobile device/emulator origin (adjust port if needed) "http://192.168.255.221:8081", - # Add other origins if necessary, e.g., production frontend URL + "https://maia.depaoli.id.au" ], allow_credentials=True, allow_methods=["*"], diff --git a/interfaces/nativeapp/src/api/client.ts b/interfaces/nativeapp/src/api/client.ts index 4cb43c4..0bd4e05 100644 --- a/interfaces/nativeapp/src/api/client.ts +++ b/interfaces/nativeapp/src/api/client.ts @@ -6,8 +6,8 @@ import AsyncStorage from '@react-native-async-storage/async-storage'; // const API_BASE_URL = process.env.EXPO_PUBLIC_API_URL || 'http://192.168.255.221:8000/api'; // Use your machine's IP -const API_BASE_URL = process.env.EXPO_PUBLIC_API_URL || 'http://192.168.1.9:8000/api'; // Use your machine's IP -// const API_BASE_URL = process.env.EXPO_PUBLIC_API_URL || 'http://localhost:8000/api'; // Use your machine's IP +// const API_BASE_URL = process.env.EXPO_PUBLIC_API_URL || 'http://192.168.1.9:8000/api'; // Use your machine's IP +const API_BASE_URL = process.env.EXPO_PUBLIC_API_URL || 'https://maia.depaoli.id.au/api'; // Use your machine's IP const ACCESS_TOKEN_KEY = 'maia_access_token'; // Renamed for clarity const REFRESH_TOKEN_KEY = 'maia_refresh_token'; // Key for refresh token