// Token: 0x06001480 RID: 5248 RVA: 0x0007D2EC File Offset: 0x0007B4EC
        protected override void OnLoad(EventArgs e)
        {
            this.Context.Response.Headers.Remove("X-FRAME-OPTIONS");
            SuiteServiceProxyHelper suiteServiceProxyHelper = new SuiteServiceProxyHelper();
            string text = string.Join(", ", from domain in suiteServiceProxyHelper.GetSuiteServiceProxyOriginAllowedList()
                                      select HttpUtility.JavaScriptStringEncode(domain, true));
            string suiteServiceProxyScriptUrl = suiteServiceProxyHelper.GetSuiteServiceProxyScriptUrl();

            if (string.IsNullOrEmpty(text) || string.IsNullOrEmpty(suiteServiceProxyScriptUrl))
            {
                throw new ArgumentException("Call GetShellInfo to Shell service failed");
            }
            string script = string.Format("\r\n                var settings = {{\r\n                    originAuthorityValidator: O365SuiteServiceProxy.ServiceHandlers.validateOrigin,\r\n                    onBeforeSendRequest: O365SuiteServiceProxy.ServiceHandlers.onBeforeSendRequestSuiteService,\r\n                    trustedOriginAuthorities: [{0}]\r\n                }};\r\n\r\n                O365SuiteServiceProxy.RequestExecutorMessageProcessor.init(settings);", text);

            this.Page.ClientScript.RegisterStartupScript(typeof(SuiteServiceProxy), "InitializationScript", script, true);
            this.Page.ClientScript.RegisterClientScriptInclude("SuiteServiceProxy", suiteServiceProxyScriptUrl);
        }
        // Token: 0x060009FA RID: 2554 RVA: 0x00045738 File Offset: 0x00043938
        protected bool IsRedirectAllowed(string returnUrl)
        {
            bool result = false;
            Uri  uri    = new Uri(returnUrl);

            if (uri.Scheme.Equals("https", StringComparison.OrdinalIgnoreCase))
            {
                SuiteServiceProxyHelper suiteServiceProxyHelper = new SuiteServiceProxyHelper();
                string[] suiteServiceProxyOriginAllowedList     = suiteServiceProxyHelper.GetSuiteServiceProxyOriginAllowedList();
                foreach (string pattern in suiteServiceProxyOriginAllowedList)
                {
                    Regex regex = new Regex(pattern);
                    if (regex.IsMatch(uri.Authority))
                    {
                        result = true;
                        break;
                    }
                }
            }
            return(result);
        }