2023-09-26
This commit is contained in:
@@ -46,6 +46,23 @@ namespace FineUIPro.Web
|
||||
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
string url = HttpContext.Current.Request.Path;
|
||||
|
||||
string a = Request.ServerVariables["HTTP_REFERER"];
|
||||
string Referer = Request.Headers["Referer"];
|
||||
|
||||
if (a == null)
|
||||
{
|
||||
bool IsDataShowPage = ConstValue.drpConstItemList(ConstValue.Group_InterfacePopup).FirstOrDefault(x => url.Contains(x.ConstValue)) != null;
|
||||
bool IsSafeReferer = ConstValue.drpConstItemList(ConstValue.Group_SafeReferer).FirstOrDefault(x => x.ConstValue == url) != null;
|
||||
if (!IsDataShowPage && !IsSafeReferer)
|
||||
{
|
||||
if (this.Page.Request.AppRelativeCurrentExecutionFilePath != "~/Login.aspx")
|
||||
Response.Redirect("~/Login.aspx");
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
var pm = PageManager.Instance;
|
||||
if (pm != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user