Compare commits
No commits in common. "main" and "new-branch" have entirely different histories.
main
...
new-branch
6 changed files with 13 additions and 23 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -391,6 +391,3 @@ temp/
|
|||
|
||||
# Local development configuration (DO NOT COMMIT)
|
||||
frontend/public/config.local.js
|
||||
|
||||
# Environment variables
|
||||
.env
|
||||
|
|
|
|||
8
frontend/.env
Normal file
8
frontend/.env
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# Removed hardcoded PUBLIC_URL to enable flexible deployment paths
|
||||
# The app now uses runtime configuration from config.json for base path detection
|
||||
|
||||
# Optional: Set this if you want to override the runtime base path detection
|
||||
# REACT_APP_BASE_PATH_OVERRIDE=/your-custom-path
|
||||
|
||||
# Temporarily disable Azure AD authentication for testing
|
||||
REACT_APP_DISABLE_AUTH=true
|
||||
|
|
@ -20,7 +20,7 @@ echo "1. Copy build files to your web server at any path:"
|
|||
echo " Example: scp -r build/* user@server:/var/www/html/your-app-path/"
|
||||
echo ""
|
||||
echo "2. Update config.json on your server:"
|
||||
echo " - Set 'basePath' to match your deployment path (e.g., '/video_query')"
|
||||
echo " - Set 'basePath' to match your deployment path (e.g., '/video_query', '/video-query')"
|
||||
echo " - Set 'domain' to your server's domain"
|
||||
echo " - Update MSAL and API endpoints as needed"
|
||||
echo ""
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
window.__APP_CONFIG__ = {
|
||||
"_comment": "PRODUCTION CONFIG - Dynamic base path configuration - set basePath to override auto-detection",
|
||||
"basePath": "/video_query",
|
||||
"basePath": "/video-query",
|
||||
"domain": "https://brandtechsandbox.oliver.solutions",
|
||||
"msal": {
|
||||
"clientId": "9079054c-9620-4757-a256-23413042f1ef",
|
||||
"authority": "https://login.microsoftonline.com/e519c2e6-bc6d-4fdf-8d9c-923c2f002385",
|
||||
"redirectUri": "https://brandtechsandbox.oliver.solutions/video_query/",
|
||||
"postLogoutRedirectUri": "https://brandtechsandbox.oliver.solutions/video_query/",
|
||||
"redirectUri": "https://brandtechsandbox.oliver.solutions/video-query/",
|
||||
"postLogoutRedirectUri": "https://brandtechsandbox.oliver.solutions/video-query/",
|
||||
"tenantId": "e519c2e6-bc6d-4fdf-8d9c-923c2f002385"
|
||||
},
|
||||
"api": {
|
||||
|
|
|
|||
|
|
@ -137,16 +137,6 @@ export const getApiConfig = () => {
|
|||
throw new Error('Configuration not loaded. Call loadConfig() first.');
|
||||
}
|
||||
|
||||
// Check for environment variable override
|
||||
if (process.env.REACT_APP_BACKEND_URL) {
|
||||
const backendUrl = process.env.REACT_APP_BACKEND_URL.replace(/\/$/, ''); // Remove trailing slash if present
|
||||
console.log('ConfigLoader: Using backend URL from env:', backendUrl);
|
||||
return {
|
||||
videoProcessingEndpoint: `${backendUrl}/api/process`,
|
||||
chunkedUploadEndpoint: backendUrl
|
||||
};
|
||||
}
|
||||
|
||||
return cachedConfig.api || {};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ const detectBasePath = () => {
|
|||
|
||||
// Common patterns for where React apps are deployed
|
||||
const commonAppPaths = [
|
||||
'video_query', 'videoquery',
|
||||
'video_query', 'video-query', 'videoquery',
|
||||
'app', 'frontend', 'client', 'ui', 'web'
|
||||
];
|
||||
|
||||
|
|
@ -193,11 +193,6 @@ export const getFullPath = (path = '/') => {
|
|||
* @returns {string} Full redirect URI
|
||||
*/
|
||||
export const getRedirectUri = (path = '/') => {
|
||||
// Allow override via environment variable
|
||||
if (process.env.REACT_APP_MSAL_REDIRECT_URL) {
|
||||
console.log('PathUtils: Using configured redirect URL from env:', process.env.REACT_APP_MSAL_REDIRECT_URL);
|
||||
return process.env.REACT_APP_MSAL_REDIRECT_URL;
|
||||
}
|
||||
return getFullUrl(path);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue