Skip to content

Commit 8691c55

Browse files
feat: option to disable https redirection (#23)
* fix: remove smalltalk * fix: smalltalk try 2 * Update .gitattributes * fix: removing smalltalk * fix: copy hook * feat: disable https redirection
1 parent 676fbd9 commit 8691c55

File tree

21 files changed

+15
-7
lines changed

21 files changed

+15
-7
lines changed
Binary file not shown.

src/api-gateways/DevStore.Bff.Checkout/appsettings.Development.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"Application": "BffCheckout"
2323
}
2424
},
25-
"AllowedHosts": "*",
2625
"ShoppingCartUrl": "https://localhost:5411",
2726
"CatalogUrl": "https://localhost:5431",
2827
"CustomerUrl": "https://localhost:5441",

src/api-gateways/DevStore.Bff.Checkout/appsettings.Docker.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"Application": "BffCheckout"
2323
}
2424
},
25-
"AllowedHosts": "*",
2625
"ShoppingCartUrl": "https://devstore-api-cart:5201",
2726
"CatalogUrl": "https://devstore-api-catalog:5301",
2827
"CustomerUrl": "https://devstore-api-customers:5401",

src/api-gateways/DevStore.Bff.Checkout/appsettings.Production.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"Application": "BffCheckout"
2323
}
2424
},
25-
"AllowedHosts": "*",
25+
2626
"ShoppingCartUrl": "https://devstore-api-cart:5201",
2727
"CatalogUrl": "https://devstore-api-catalog:5301",
2828
"CustomerUrl": "https://devstore-api-customers:5401",

src/api-gateways/DevStore.Bff.Checkout/appsettings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"AllowedHosts": "*",
3+
"USE_HTTPS_REDIRECTION": "true",
34
"AppSettings": {
45
"Issuer": "https://devstore.academy",
56
"Audience": "DevStore"
Binary file not shown.

src/services/DevStore.Billing.API/appsettings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"AllowedHosts": "*",
3+
"USE_HTTPS_REDIRECTION": "true",
34
"AppSettings": {
45
"Issuer": "https://devstore.academy",
56
"Audience": "DevStore",
Binary file not shown.

src/services/DevStore.Catalog.API/appsettings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"AllowedHosts": "*",
3+
"USE_HTTPS_REDIRECTION": "true",
34
"AppSettings": {
45
"Issuer": "https://devstore.academy",
56
"Audience": "DevStore",
Binary file not shown.

src/services/DevStore.Customers.API/appsettings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"AllowedHosts": "*",
3+
"USE_HTTPS_REDIRECTION": "true",
34
"AppSettings": {
45
"Issuer": "https://devstore.academy",
56
"Audience": "DevStore",
Binary file not shown.

src/services/DevStore.Identity.API/appsettings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"AllowedHosts": "*",
3+
"USE_HTTPS_REDIRECTION": "true",
34
"AppSettings": {
45
"Issuer": "https://devstore.academy",
56
"Audience": "DevStore",
Binary file not shown.

src/services/DevStore.Orders.API/appsettings.Development.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"Application": "Orders"
2323
}
2424
},
25-
"AllowedHosts": "*",
25+
2626
"ConnectionStrings": {
2727
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=DSOrders;Trusted_Connection=True;MultipleActiveResultSets=true"
2828
},

src/services/DevStore.Orders.API/appsettings.Docker.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"Application": "Orders"
2323
}
2424
},
25-
"AllowedHosts": "*",
25+
2626
"ConnectionStrings": {
2727
"DefaultConnection": "Server=database-order;Database=DSOrders;MultipleActiveResultSets=true;User Id=sa;Password=MyDB@123"
2828
},

src/services/DevStore.Orders.API/appsettings.Production.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"Application": "Orders"
2323
}
2424
},
25-
"AllowedHosts": "*",
25+
2626
"ConnectionStrings": {
2727
"DefaultConnection": "Server=database-order;Database=DSOrders;MultipleActiveResultSets=true;User Id=sa;Password=MyDB@123"
2828
},

src/services/DevStore.Orders.API/appsettings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"AllowedHosts": "*",
3+
"USE_HTTPS_REDIRECTION": "true",
34
"AppSettings": {
45
"Issuer": "https://devstore.academy",
56
"Audience": "DevStore",

src/services/DevStore.ShoppingCart.API/Configuration/ApiConfig.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ public static void UseApiConfiguration(this WebApplication app, IWebHostEnvironm
3434
app.UseDeveloperExceptionPage();
3535
}
3636

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

3943
app.UseCors("Total");
4044

Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)