Refactor API URLs to use GlobalConstants and update CORS configurations for production

This commit is contained in:
liosha84
2025-07-28 13:15:44 +03:00
parent 88f0cf307e
commit c58dd4ac5c
45 changed files with 587 additions and 72 deletions
+15
View File
@@ -0,0 +1,15 @@
import {environment} from '../environments/environment';
export class GlobalConstants {
public static readonly API_URL = (() => {
// ... calculate the value and return it
if(environment.production) {
return `${environment.host_name}/api`;
}else {
return `${environment.host_name}:${environment.port}/api`;
}
})();
}