Browse Source

Fix the https middleware.

pull/523/head
Sebastian 6 years ago
parent
commit
a9a8c45226
  1. 3
      backend/src/Squidex.Web/Pipeline/EnforceHttpsMiddleware.cs

3
backend/src/Squidex.Web/Pipeline/EnforceHttpsMiddleware.cs

@ -5,7 +5,6 @@
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Options;
@ -34,7 +33,7 @@ namespace Squidex.Web.Pipeline
{
var hostName = context.Request.Host.ToString().ToLowerInvariant();
if (!string.Equals(context.Request.Scheme, "https", StringComparison.OrdinalIgnoreCase))
if (!context.Request.IsHttps)
{
var newUrl = string.Concat("https://", hostName, context.Request.Path, context.Request.QueryString);

Loading…
Cancel
Save