Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DNN Platform/DotNetNuke.Web.Mvc/DnnMvcHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ private ModuleRequestContext GetModuleRequestContext(HttpContextBase httpContext
{
HttpContext = httpContext,
ModuleContext = moduleContext,
ModuleApplication = new ModuleApplication(this.RequestContext, DisableMvcResponseHeader)
ModuleApplication = new ModuleApplication(this.RequestContext)
{
ModuleName = desktopModule.ModuleName,
FolderPath = desktopModule.FolderName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,23 @@ public class ModuleApplication
private bool initialized;

public ModuleApplication()
: this(null, false)
: this(null)
{
}

public ModuleApplication(bool disableMvcResponseHeader)
: this(null, disableMvcResponseHeader)
: this(null)
{
}

public ModuleApplication(RequestContext requestContext, bool disableMvcResponseHeader)
: this(requestContext)
{
this.RequestContext = requestContext;
}

DisableMvcResponseHeader = disableMvcResponseHeader;
public ModuleApplication(RequestContext requestContext)
{
this.RequestContext = requestContext;

// ReSharper disable once DoNotCallOverridableMethodsInConstructor
this.ControllerFactory = Globals.GetCurrentServiceProvider().GetRequiredService<IControllerFactory>();
Expand All @@ -70,8 +73,6 @@ public ModuleApplication(RequestContext requestContext, bool disableMvcResponseH

public ViewEngineCollection ViewEngines { get; set; }

private static bool DisableMvcResponseHeader { get; set; }

public virtual ModuleRequestResult ExecuteRequest(ModuleRequestContext context)
{
this.EnsureInitialized();
Expand Down Expand Up @@ -164,7 +165,7 @@ protected internal virtual void Init()

protected internal virtual void AddVersionHeader(HttpContextBase httpContext)
{
if (!DisableMvcResponseHeader)
if (!DnnMvcHandler.DisableMvcResponseHeader)
{
httpContext.Response.AppendHeader(MvcVersionHeaderName, MvcVersion);
}
Expand Down
Loading