ASP.Net Core development mode no longer redirects to https.
Fixes hot module reloading through proxy. Production mode still redirects to https.
This commit is contained in:
parent
3d3c43b944
commit
4e12a4b7fc
1
MultiShop/client/vue.config.js
Normal file
1
MultiShop/client/vue.config.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
@ -18,7 +18,7 @@
|
|||||||
"MultiShop": {
|
"MultiShop": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
"applicationUrl": "https://localhost:5001;http://localhost:5000",
|
"applicationUrl": "http://localhost:5000;https://localhost:5001",
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
using Microsoft.AspNetCore.Authentication;
|
using Microsoft.AspNetCore.Authentication;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Identity;
|
|
||||||
using Microsoft.AspNetCore.Identity.UI;
|
|
||||||
using Microsoft.AspNetCore.HttpsPolicy;
|
|
||||||
using Microsoft.AspNetCore.SpaServices.AngularCli;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using MultiShop.Data;
|
using MultiShop.Data;
|
||||||
using MultiShop.Models;
|
using MultiShop.Models;
|
||||||
@ -72,12 +68,9 @@ namespace MultiShop
|
|||||||
app.UseHsts();
|
app.UseHsts();
|
||||||
}
|
}
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
if (!env.IsDevelopment()) app.UseHttpsRedirection();
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
if (!env.IsDevelopment())
|
if (!env.IsDevelopment()) app.UseSpaStaticFiles();
|
||||||
{
|
|
||||||
app.UseSpaStaticFiles();
|
|
||||||
}
|
|
||||||
|
|
||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user