diff --git a/scripts/deploy/configure-api-domain.sh b/scripts/deploy/configure-api-domain.sh index dac2c41..3de0c57 100755 --- a/scripts/deploy/configure-api-domain.sh +++ b/scripts/deploy/configure-api-domain.sh @@ -59,7 +59,7 @@ server { add_header Access-Control-Allow-Origin \$cors_origin always; add_header Access-Control-Allow-Credentials "true" always; add_header Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE, OPTIONS" always; - add_header Access-Control-Allow-Headers "Authorization, Content-Type, AdminWebSessionID, X-Requested-With" always; + add_header Access-Control-Allow-Headers "Authorization, Content-Type, AdminWebSessionID, WebSessionID, Currency, X-Language, X-Region, X-Requested-With" always; add_header Vary "Origin" always; if (\$request_method = OPTIONS) { return 204; } diff --git a/src/app/app.html b/src/app/app.html index 2b24c78..356d4e2 100644 --- a/src/app/app.html +++ b/src/app/app.html @@ -10,6 +10,8 @@

{{ 'app.serverError' | translate }}

+} @else if (isAdminHost && !isAdminRoute()) { + } @else if (isAdminRoute()) { @@ -30,4 +32,4 @@ } -} \ No newline at end of file +} diff --git a/src/app/app.ts b/src/app/app.ts index a12a3a9..98ce86a 100644 --- a/src/app/app.ts +++ b/src/app/app.ts @@ -28,6 +28,8 @@ import { TelegramLoginComponent } from './components/telegram-login/telegram-log }) export class App implements OnInit { protected title = ''; + readonly isAdminHost = typeof window !== 'undefined' + && window.location.hostname.toLowerCase().startsWith('admin.'); isHomePage = signal(true); isAdminRoute = signal(false); checkingServer = signal(true);