Skip to content

Commit

Permalink
feat: option to disable https redirection (#23)
Browse files Browse the repository at this point in the history
* fix: remove smalltalk

* fix: smalltalk try 2

* Update .gitattributes

* fix: removing smalltalk

* fix: copy hook

* feat: disable https redirection
  • Loading branch information
brunobritodev committed Jan 5, 2023
1 parent 676fbd9 commit 8691c55
Show file tree
Hide file tree
Showing 21 changed files with 15 additions and 7 deletions.
Binary file modified src/api-gateways/DevStore.Bff.Checkout/Configuration/ApiConfig.cs
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"Application": "BffCheckout"
}
},
"AllowedHosts": "*",
"ShoppingCartUrl": "https://localhost:5411",
"CatalogUrl": "https://localhost:5431",
"CustomerUrl": "https://localhost:5441",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"Application": "BffCheckout"
}
},
"AllowedHosts": "*",
"ShoppingCartUrl": "https://devstore-api-cart:5201",
"CatalogUrl": "https://devstore-api-catalog:5301",
"CustomerUrl": "https://devstore-api-customers:5401",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"Application": "BffCheckout"
}
},
"AllowedHosts": "*",

"ShoppingCartUrl": "https://devstore-api-cart:5201",
"CatalogUrl": "https://devstore-api-catalog:5301",
"CustomerUrl": "https://devstore-api-customers:5401",
Expand Down
1 change: 1 addition & 0 deletions src/api-gateways/DevStore.Bff.Checkout/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"AllowedHosts": "*",
"USE_HTTPS_REDIRECTION": "true",
"AppSettings": {
"Issuer": "https://devstore.academy",
"Audience": "DevStore"
Expand Down
Binary file modified src/services/DevStore.Billing.API/Configuration/ApiConfig.cs
Binary file not shown.
1 change: 1 addition & 0 deletions src/services/DevStore.Billing.API/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"AllowedHosts": "*",
"USE_HTTPS_REDIRECTION": "true",
"AppSettings": {
"Issuer": "https://devstore.academy",
"Audience": "DevStore",
Expand Down
Binary file modified src/services/DevStore.Catalog.API/Configuration/ApiConfig.cs
Binary file not shown.
1 change: 1 addition & 0 deletions src/services/DevStore.Catalog.API/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"AllowedHosts": "*",
"USE_HTTPS_REDIRECTION": "true",
"AppSettings": {
"Issuer": "https://devstore.academy",
"Audience": "DevStore",
Expand Down
Binary file modified src/services/DevStore.Customers.API/Configuration/ApiConfig.cs
Binary file not shown.
1 change: 1 addition & 0 deletions src/services/DevStore.Customers.API/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"AllowedHosts": "*",
"USE_HTTPS_REDIRECTION": "true",
"AppSettings": {
"Issuer": "https://devstore.academy",
"Audience": "DevStore",
Expand Down
Binary file modified src/services/DevStore.Identity.API/Configuration/ApiConfig.cs
Binary file not shown.
1 change: 1 addition & 0 deletions src/services/DevStore.Identity.API/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"AllowedHosts": "*",
"USE_HTTPS_REDIRECTION": "true",
"AppSettings": {
"Issuer": "https://devstore.academy",
"Audience": "DevStore",
Expand Down
Binary file modified src/services/DevStore.Orders.API/Configuration/ApiConfig.cs
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"Application": "Orders"
}
},
"AllowedHosts": "*",

"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=DSOrders;Trusted_Connection=True;MultipleActiveResultSets=true"
},
Expand Down
2 changes: 1 addition & 1 deletion src/services/DevStore.Orders.API/appsettings.Docker.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"Application": "Orders"
}
},
"AllowedHosts": "*",

"ConnectionStrings": {
"DefaultConnection": "Server=database-order;Database=DSOrders;MultipleActiveResultSets=true;User Id=sa;Password=MyDB@123"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"Application": "Orders"
}
},
"AllowedHosts": "*",

"ConnectionStrings": {
"DefaultConnection": "Server=database-order;Database=DSOrders;MultipleActiveResultSets=true;User Id=sa;Password=MyDB@123"
},
Expand Down
1 change: 1 addition & 0 deletions src/services/DevStore.Orders.API/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"AllowedHosts": "*",
"USE_HTTPS_REDIRECTION": "true",
"AppSettings": {
"Issuer": "https://devstore.academy",
"Audience": "DevStore",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ public static void UseApiConfiguration(this WebApplication app, IWebHostEnvironm
app.UseDeveloperExceptionPage();
}

app.UseHttpsRedirection();
// Under certain scenarios, e.g minikube / linux environment / behind load balancer
// https redirection could lead dev's to over complicated configuration for testing purpouses
// In production is a good practice to keep it true
if (app.Configuration["USE_HTTPS_REDIRECTION"] == "true")
app.UseHttpsRedirection();

app.UseCors("Total");

Expand Down
Binary file modified src/web/DevStore.WebApp.MVC/Configuration/WebAppConfig.cs
Binary file not shown.
Binary file modified src/web/DevStore.WebApp.MVC/DevStore.WebApp.MVC.csproj
Binary file not shown.

0 comments on commit 8691c55

Please sign in to comment.