Skip to content

Commit

Permalink
chore(proxy): ocelot dev configuratie toegevoegd
Browse files Browse the repository at this point in the history
  • Loading branch information
MelvLee committed Oct 12, 2023
1 parent 193dfb7 commit 582eb9f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
10 changes: 4 additions & 6 deletions src/Woz.BevragenProxy/Program.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Woz.BevragenProxy
{
Expand All @@ -20,7 +16,9 @@ public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureAppConfiguration((hostBuilderContext, configBuilder) =>
{
configBuilder.AddJsonFile("config/ocelot.json");
configBuilder.AddJsonFile(Path.Combine("config", "ocelot.json"))
.AddJsonFile(Path.Combine("config", $"ocelot.{hostBuilderContext.HostingEnvironment.EnvironmentName}.json"), true)
.AddEnvironmentVariables();
})
.ConfigureWebHostDefaults(webBuilder =>
{
Expand Down
16 changes: 16 additions & 0 deletions src/Woz.BevragenProxy/config/ocelot.Development.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"Routes": [
{
"UpstreamPathTemplate": "/lvwoz-eto/huidigebevragingen/{everything}",
"DownstreamPathTemplate": "/lvwoz-eto/huidigebevragingen/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": "5010"
}
]
}
]
}

8 changes: 4 additions & 4 deletions src/Woz.BevragenProxy/config/ocelot.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"Routes": [
{
"UpstreamPathTemplate": "/{everything}",
"UpstreamPathTemplate": "/lvwoz-eto/huidigebevragingen/{everything}",
"DownstreamPathTemplate": "/lvwoz-eto/huidigebevragingen/{everything}",
"DownstreamScheme": "https",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "api.kadaster.nl",
"Port": "443"
"Host": "wozbevragenmock",
"Port": "5010"
}
],
"UpstreamHeaderTransform": {
Expand Down

0 comments on commit 582eb9f

Please sign in to comment.