Browse Source

MVC adapted to marketing bff apigw

pull/565/head^2
eiximenis 7 years ago
parent
commit
181b475e32
5 changed files with 37 additions and 6 deletions
  1. +1
    -2
      docker-compose.override.yml
  2. +34
    -1
      src/ApiGateways/Web.Bff.Marketing/apigw/configuration.json
  3. +0
    -1
      src/Web/WebMVC/AppSettings.cs
  4. +1
    -1
      src/Web/WebMVC/Services/CampaignService.cs
  5. +1
    -1
      src/Web/WebMVC/Services/LocationService.cs

+ 1
- 2
docker-compose.override.yml View File

@ -134,9 +134,8 @@ services:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://0.0.0.0:80
- PurchaseUrl=http://webshoppingapigw
- LocationsUrl=http://locations.api
- IdentityUrl=http://10.0.75.1:5105 # Local Mac: Use http://docker.for.mac.localhost:5105 || Local Windows: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser. || #Remote access: Use ${ESHOP_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser.
- MarketingUrl=http://marketing.api
- MarketingUrl=http://webmarketingapigw
- CatalogUrlHC=http://catalog.api/hc
- OrderingUrlHC=http://ordering.api/hc
- IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser.


+ 34
- 1
src/ApiGateways/Web.Bff.Marketing/apigw/configuration.json View File

@ -1 +1,34 @@
{}
{
"ReRoutes": [
{
"DownstreamPathTemplate": "/api/{version}/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "marketing.api",
"Port": 80
}
],
"UpstreamPathTemplate": "/api/{version}/m/{everything}",
"UpstreamHttpMethod": []
},
{
"DownstreamPathTemplate": "/api/{version}/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "locations.api",
"Port": 80
}
],
"UpstreamPathTemplate": "/api/{version}/l/{everything}",
"UpstreamHttpMethod": []
}
],
"GlobalConfiguration": {
"RequestIdKey": "OcRequestId",
"AdministrationPath": "/administration"
}
}

+ 0
- 1
src/Web/WebMVC/AppSettings.cs View File

@ -9,7 +9,6 @@ namespace Microsoft.eShopOnContainers.WebMVC
{
public Connectionstrings ConnectionStrings { get; set; }
public string MarketingUrl { get; set; }
public string LocationsUrl { get; set; }
public string PurchaseUrl { get; set; }
public bool ActivateCampaignDetailFunction { get; set; }


+ 1
- 1
src/Web/WebMVC/Services/CampaignService.cs View File

@ -26,7 +26,7 @@
_apiClient = httpClient;
_logger = logger;
_remoteServiceBaseUrl = $"{_settings.Value.MarketingUrl}/api/v1/campaigns/";
_remoteServiceBaseUrl = $"{_settings.Value.MarketingUrl}/api/v1/m/campaigns/";
_httpContextAccesor = httpContextAccesor ?? throw new ArgumentNullException(nameof(httpContextAccesor));
}


+ 1
- 1
src/Web/WebMVC/Services/LocationService.cs View File

@ -27,7 +27,7 @@ namespace WebMVC.Services
_apiClient = httpClient;
_logger = logger;
_remoteServiceBaseUrl = $"{_settings.Value.LocationsUrl}/api/v1/locations/";
_remoteServiceBaseUrl = $"{_settings.Value.MarketingUrl}/api/v1/l/locations/";
_httpContextAccesor = httpContextAccesor ?? throw new ArgumentNullException(nameof(httpContextAccesor));
}


Loading…
Cancel
Save