implemented ratings, fixes

This commit is contained in:
lnn0q 2025-06-01 17:54:57 +03:00
parent 4801cf3a13
commit d1da980501
31 changed files with 775 additions and 236 deletions

View file

@ -29,12 +29,17 @@ export function toAppConfig(): AppConfig {
const host = process.env.VITE_HOST || 'localhost';
const port = parseInt(process.env.VITE_PORT || '3000');
const hostRemote = process.env.VITE_HOST_REMOTE || 'localhost';
const domainName = process.env.VITE_DOMAIN_NAME || 'localhost';
const urlIp = `http://${hostRemote}:${port}`;
const urlDomain = `http://${domainName}:${port}`;
const urlRemote = `https://${host}:${port}`;
const urlLocal = host !== 'localhost' ? `https://localhost:${port}` : undefined;
const limit = { limit: '50mb' };
const origin = urlLocal != null ? [urlLocal, urlRemote] : [urlRemote];
const origin = urlLocal != null ? [urlLocal, urlRemote, urlIp, urlDomain] : [urlRemote];
const corsOptions: cors.CorsOptions = {
origin,
credentials: true