From 58b60c1f6809171d730171a4de6ea0eb2fbca699 Mon Sep 17 00:00:00 2001 From: wiz Date: Thu, 21 Jul 2022 18:07:28 +0200 Subject: [PATCH 1/2] Route new APIs to services backend --- .../nginx/location-api-v1-services.conf | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/production/nginx/location-api-v1-services.conf b/production/nginx/location-api-v1-services.conf index aae49727e..869036c54 100644 --- a/production/nginx/location-api-v1-services.conf +++ b/production/nginx/location-api-v1-services.conf @@ -70,6 +70,30 @@ location /api/v1/translators { proxy_hide_header content-security-policy; proxy_hide_header x-frame-options; } +location /api/v1/enterprise/images { + proxy_pass $mempoolSpaceServices; + proxy_cache services; + proxy_cache_background_update on; + proxy_cache_use_stale updating; + proxy_cache_valid 200 10m; + expires 10m; + proxy_hide_header onion-location; + proxy_hide_header strict-transport-security; + proxy_hide_header content-security-policy; + proxy_hide_header x-frame-options; +} +location /api/v1/enterprise { + proxy_pass $mempoolSpaceServices; + proxy_cache services; + proxy_cache_background_update on; + proxy_cache_use_stale updating; + proxy_cache_valid 200 5m; + expires 5m; + proxy_hide_header onion-location; + proxy_hide_header strict-transport-security; + proxy_hide_header content-security-policy; + proxy_hide_header x-frame-options; +} location /api/v1/assets { proxy_pass $mempoolSpaceServices; proxy_cache services; From b1b4bdf575847e653657f18aab97f0465c88d76d Mon Sep 17 00:00:00 2001 From: softsimon Date: Thu, 21 Jul 2022 19:58:12 +0200 Subject: [PATCH 2/2] Subdomain enterprise support --- frontend/src/app/app.module.ts | 2 + .../master-page/master-page.component.html | 3 + .../master-page/master-page.component.scss | 5 ++ .../master-page/master-page.component.ts | 6 +- frontend/src/app/services/api.service.ts | 4 + .../src/app/services/enterprise.service.ts | 79 +++++++++++++++++++ frontend/src/app/services/seo.service.ts | 18 +++-- frontend/src/index.bisq.html | 16 ---- frontend/src/index.liquid.html | 16 ---- frontend/src/index.mempool.html | 16 ---- 10 files changed, 110 insertions(+), 55 deletions(-) create mode 100644 frontend/src/app/services/enterprise.service.ts diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index 8f95920f3..97c8f9957 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -6,6 +6,7 @@ import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './components/app/app.component'; import { ElectrsApiService } from './services/electrs-api.service'; import { StateService } from './services/state.service'; +import { EnterpriseService } from './services/enterprise.service'; import { WebsocketService } from './services/websocket.service'; import { AudioService } from './services/audio.service'; import { SeoService } from './services/seo.service'; @@ -36,6 +37,7 @@ import { CapAddressPipe } from './shared/pipes/cap-address-pipe/cap-address-pipe AudioService, SeoService, StorageService, + EnterpriseService, LanguageService, ShortenStringPipe, FiatShortenerPipe, diff --git a/frontend/src/app/components/master-page/master-page.component.html b/frontend/src/app/components/master-page/master-page.component.html index a4979e00d..87fa56cf4 100644 --- a/frontend/src/app/components/master-page/master-page.component.html +++ b/frontend/src/app/components/master-page/master-page.component.html @@ -1,6 +1,9 @@